blob: 051842cdaab13a2b17dd0eb073723856c984512c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef __TVSCRAPER_TVDBSCRAPER_H
#define __TVSCRAPER_TVDBSCRAPER_H
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include <set>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include "tvdbseries.h"
#include "tvdbmirrors.h"
using namespace std;
// --- cTVDBScraper -------------------------------------------------------------
class cTVDBScraper {
private:
string apiKey;
string baseURL;
string language;
cTVDBMirrors *mirrors;
xmlDoc *SetXMLDoc(string xml);
int ParseXML(string xml);
int ReadSeries(string seriesName);
public:
cTVDBScraper(string language);
virtual ~cTVDBScraper(void);
bool Connect(void);
int GetServerTime(void);
cTVDBSeries *ScrapInitial(string seriesName);
bool GetUpdatedSeriesandEpisodes(set<int> *updatedSeries, set<int> *updatedEpisodes, int lastScrap);
cTVDBSeries *GetSeries(int seriesID);
cTVDBEpisode *GetEpisode(int episodeID);
};
#endif //__TVSCRAPER_TVDBSCRAPER_H
|