view src/include/anilist.h @ 4:5af270662505

Set override functions as override
author Paper <mrpapersonic@gmail.com>
date Sat, 12 Aug 2023 12:08:16 -0400
parents 23d0d9319a00
children 1d82f6e04d7d
line wrap: on
line source

#ifndef __anilist_h
#define __anilist_h
#include <curl/curl.h>
#include "anime.h"
#include "json.h"
class AniList {
	public:
		int Authorize();
		int GetUserId(std::string name);
		int UpdateAnimeList(std::vector<AnimeList>* anime_lists, int id);

	private:
		static size_t CurlWriteCallback(void *contents, size_t size, size_t nmemb, void *userdata);
		enum AnimeWatchingStatus ConvertWatchingStatusToEnum(std::string status);
		enum AnimeAiringStatus ConvertAiringStatusToEnum(std::string status);
		enum AnimeFormat ConvertFormatToEnum(std::string format);
		enum AnimeSeason ConvertSeasonToEnum(std::string season);
		std::string SendRequest(std::string data);
		CURL* curl;
		CURLcode res;
};
#endif // __anilist_h