annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
1 #ifndef __anilist_h
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
2 #define __anilist_h
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
3 #include <curl/curl.h>
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
4 #include "anime.h"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
5 #include "json.h"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 class AniList {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
7 public:
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
8 static int Authorize();
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
9 static int GetUserId(std::string name);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
10 static int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 private:
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 static size_t CurlWriteCallback(void *contents, size_t size, size_t nmemb, void *userdata);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
14 static std::string SendRequest(std::string data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
15 static enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
16 static enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
17 static enum AnimeFormat ConvertFormatToEnum(std::string format);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
18 static enum AnimeSeason ConvertSeasonToEnum(std::string season);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
19 static CURL* curl;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
20 static CURLcode res;
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 #endif // __anilist_h