Add implementation to cache reader
[dueringa_WikiWalker.git] / src / CurlWikiGrabber.h
blob46e4740ca714ba511e7f2b9bac3528de5fba53c0
1 //! \file CurlWikiGrabber.h
3 #ifndef _CURL_WIKI_GRABBER_H
4 #define _CURL_WIKI_GRABBER_H
6 #include <string>
7 #include <curl/curl.h>
9 //! Class responsible for grabbing the contents / links of an article
10 class CurlWikiGrabber
12 public:
13 /*! Create a new instance.
14 * Might throw an exception, if curl intialization failed
16 CurlWikiGrabber();
18 ~CurlWikiGrabber()
20 curl_global_cleanup();
23 /*! given an URL, return article JSON data
24 * \param url URL of the article
25 * \returns article JSON data
27 std::string grabUrl(std::string url) const;
30 #endif // _CURL_WIKI_GRABBER_H