annotate src/include/anilist.h @ 6:1d82f6e04d7d

Update: add first parts to the settings dialog
author Paper <mrpapersonic@gmail.com>
date Wed, 16 Aug 2023 00:49:17 -0400
parents 23d0d9319a00
children 07a9095eaeed
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();
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
9 int GetUserId(std::string name);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10 int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id);
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);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14 enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
15 enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
16 enum AnimeFormat ConvertFormatToEnum(std::string format);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
17 enum AnimeSeason ConvertSeasonToEnum(std::string season);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
18 std::string SendRequest(std::string data);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
19 CURL* curl;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
20 CURLcode res;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 #endif // __anilist_h