2
|
1 #ifndef __anilist_h
|
|
2 #define __anilist_h
|
|
3 #include <curl/curl.h>
|
|
4 #include "anime.h"
|
|
5 #include "json.h"
|
|
6 class AniList {
|
|
7 public:
|
|
8 int Authorize();
|
|
9 int GetUserId(std::string name);
|
|
10 int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id);
|
|
11
|
|
12 private:
|
|
13 static size_t CurlWriteCallback(void *contents, size_t size, size_t nmemb, void *userdata);
|
|
14 enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status);
|
|
15 enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status);
|
|
16 enum AnimeFormat ConvertFormatToEnum(std::string format);
|
|
17 enum AnimeSeason ConvertSeasonToEnum(std::string season);
|
|
18 std::string SendRequest(std::string data);
|
|
19 CURL* curl;
|
|
20 CURLcode res;
|
|
21 };
|
|
22 #endif // __anilist_h
|