comparison src/include/anilist.h @ 7:07a9095eaeed

Update Refactored some code, moved some around
author Paper <mrpapersonic@gmail.com>
date Thu, 24 Aug 2023 23:11:38 -0400
parents 1d82f6e04d7d
children
comparison
equal deleted inserted replaced
6:1d82f6e04d7d 7:07a9095eaeed
4 #include "anime.h" 4 #include "anime.h"
5 #include "json.h" 5 #include "json.h"
6 class AniList { 6 class AniList {
7 public: 7 public:
8 static int Authorize(); 8 static int Authorize();
9 int GetUserId(std::string name); 9 static int GetUserId(std::string name);
10 int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id); 10 static int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id);
11 11
12 private: 12 private:
13 static size_t CurlWriteCallback(void *contents, size_t size, size_t nmemb, void *userdata); 13 static size_t CurlWriteCallback(void *contents, size_t size, size_t nmemb, void *userdata);
14 enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status); 14 static std::string SendRequest(std::string data);
15 enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status); 15 static enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status);
16 enum AnimeFormat ConvertFormatToEnum(std::string format); 16 static enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status);
17 enum AnimeSeason ConvertSeasonToEnum(std::string season); 17 static enum AnimeFormat ConvertFormatToEnum(std::string format);
18 std::string SendRequest(std::string data); 18 static enum AnimeSeason ConvertSeasonToEnum(std::string season);
19 CURL* curl; 19 static CURL* curl;
20 CURLcode res; 20 static CURLcode res;
21 }; 21 };
22 #endif // __anilist_h 22 #endif // __anilist_h