|
|
|
@ -46,44 +46,44 @@ namespace PlexRequests.Api
|
|
|
|
|
public TMDbClient Client { get; set; }
|
|
|
|
|
public async Task<List<SearchMovie>> SearchMovie(string searchTerm)
|
|
|
|
|
{
|
|
|
|
|
var results = await Client.SearchMovieAsync(searchTerm);
|
|
|
|
|
var results = await Client.SearchMovie(searchTerm);
|
|
|
|
|
return results.Results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
|
public async Task<List<SearchTv>> SearchTv(string searchTerm)
|
|
|
|
|
{
|
|
|
|
|
var results = await Client.SearchTvShowAsync(searchTerm);
|
|
|
|
|
var results = await Client.SearchTvShow(searchTerm);
|
|
|
|
|
return results.Results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<List<SearchMovie>> GetCurrentPlayingMovies()
|
|
|
|
|
public async Task<List<MovieResult>> GetCurrentPlayingMovies()
|
|
|
|
|
{
|
|
|
|
|
var movies = await Client.GetMovieNowPlayingListAsync();
|
|
|
|
|
var movies = await Client.GetMovieList(MovieListType.NowPlaying);
|
|
|
|
|
return movies.Results;
|
|
|
|
|
}
|
|
|
|
|
public async Task<List<SearchMovie>> GetUpcomingMovies()
|
|
|
|
|
public async Task<List<MovieResult>> GetUpcomingMovies()
|
|
|
|
|
{
|
|
|
|
|
var movies = await Client.GetMovieUpcomingListAsync();
|
|
|
|
|
var movies = await Client.GetMovieList(MovieListType.Upcoming);
|
|
|
|
|
return movies.Results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Movie> GetMovieInformation(int tmdbId)
|
|
|
|
|
{
|
|
|
|
|
var movies = await Client.GetMovieAsync(tmdbId);
|
|
|
|
|
var movies = await Client.GetMovie(tmdbId);
|
|
|
|
|
return movies;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Movie> GetMovieInformation(string imdbId)
|
|
|
|
|
{
|
|
|
|
|
var movies = await Client.GetMovieAsync(imdbId);
|
|
|
|
|
var movies = await Client.GetMovie(imdbId);
|
|
|
|
|
return movies;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
|
public async Task<TvShow> GetTvShowInformation(int tmdbId)
|
|
|
|
|
{
|
|
|
|
|
var show = await Client.GetTvShowAsync(tmdbId);
|
|
|
|
|
var show = await Client.GetTvShow(tmdbId);
|
|
|
|
|
return show;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|