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
40
41
42
43
44
45
46
|
#include "tmdb-proxy.h"
namespace TMDb {
Proxy::Proxy(const std::string & bu, const std::string & k) :
HttpClient(bu, k)
{
}
SearchMultiResultsPtr
Proxy::SearchMulti(const std::string query, const IceUtil::Optional<int> page, const Ice::Current&)
{
return GetData<SearchMultiResultsPtr>("/search/multi", { { "query", query }, { "page", page } });
}
SearchMovieResultsPtr
Proxy::SearchMovies(const std::string query, const IceUtil::Optional<int> year, const IceUtil::Optional<int> page, const Ice::Current&)
{
return GetData<SearchMovieResultsPtr>("/search/movies", { { "query", query }, { "page", page }, { "year", year } });
}
SearchPersonResultsPtr
Proxy::SearchPersons(const std::string query, const IceUtil::Optional<int> page, const Ice::Current&)
{
return GetData<SearchPersonResultsPtr>("/search/person", { { "query", query }, { "page", page } });
}
SearchTvResultsPtr
Proxy::SearchTv(const std::string query, const IceUtil::Optional<int> page, const Ice::Current&)
{
return GetData<SearchTvResultsPtr>("/search/tv", { { "query", query}, { "page", page } });
}
MoviePtr
Proxy::GetMovie(Ice::Int id, const Ice::Current&)
{
return GetData<MoviePtr, Ice::Int>("/movie/%d", id, { });
}
TvSeriesPtr
Proxy::GetTvSeries(Ice::Int id, const Ice::Current&)
{
return GetData<TvSeriesPtr, Ice::Int>("/tv/%d", id, { });
}
}
|