From e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 Mon Sep 17 00:00:00 2001 From: horchi Date: Sun, 5 Mar 2017 16:39:28 +0100 Subject: git init --- scraper/themoviedbscraper/moviedbmovie.h | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 scraper/themoviedbscraper/moviedbmovie.h (limited to 'scraper/themoviedbscraper/moviedbmovie.h') diff --git a/scraper/themoviedbscraper/moviedbmovie.h b/scraper/themoviedbscraper/moviedbmovie.h new file mode 100644 index 0000000..9e9c2fd --- /dev/null +++ b/scraper/themoviedbscraper/moviedbmovie.h @@ -0,0 +1,68 @@ +#ifndef __TVSCRAPER_MOVIEDBMOVIE_H +#define __TVSCRAPER_MOVIEDBMOVIE_H + +#include "moviedbactor.h" + +using namespace std; + +struct searchResult { + int id; + int distance; +}; + +// --- cMovieDbMovie ------------------------------------------------------------- + +class cMovieDbMovie { +private: + string json; + vector resultSet; + string apiKey; + string baseUrl; + string posterBaseUrl; + string backdropBaseUrl; + string actorBaseUrl; + vector actors; + int currentActor; + int FindBestResult(void); +public: + cMovieDbMovie(string json); + virtual ~cMovieDbMovie(void); + int id; + string title; + string originalTitle; + string tagline; + string overview; + string backdropPath; + int backdropWidth; + int backdropHeight; + string posterPath; + int posterWidth; + int posterHeight; + bool adult; + int collectionID; + string collectionName; + string collectionPosterPath; + string collectionBackdropPath; + int budget; + int revenue; + string genres; + string homepage; + string imdbid; + string releaseDate; + int runtime; + float popularity; + float voteAverage; + int ParseJSONForMovieId(string movieSearchString); + void ParseJSON(void); + void SetApiKey(string apiKey) { this->apiKey = apiKey; }; + void SetBaseUrl(string baseUrl) { this->baseUrl = baseUrl; }; + void SetPosterBaseUrl(string url) { posterBaseUrl = url; }; + void SetBackdropBaseUrl(string url) { backdropBaseUrl = url; }; + void SetActorBaseUrl(string url) { actorBaseUrl = url; }; + void ReadActors(void); + cMovieDBActor *GetActor(void); + void Dump(); +}; + + +#endif //__TVSCRAPER_TVDBSERIES_H -- cgit v1.2.3