mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-24 23:15:23 -07:00
Add GetTVSeasonInfo for MovieDb Api
This commit is contained in:
parent
8f8c46c5b1
commit
18f78d0848
2 changed files with 11 additions and 0 deletions
|
@ -28,5 +28,6 @@ namespace Ombi.Api.TheMovieDb
|
||||||
Task<Collections> GetCollection(string langCode, int collectionId, CancellationToken cancellationToken);
|
Task<Collections> GetCollection(string langCode, int collectionId, CancellationToken cancellationToken);
|
||||||
Task<List<Keyword>> SearchKeyword(string searchTerm);
|
Task<List<Keyword>> SearchKeyword(string searchTerm);
|
||||||
Task<Keyword> GetKeyword(int keywordId);
|
Task<Keyword> GetKeyword(int keywordId);
|
||||||
|
Task<TvSeason> GetTVSeasonInfo(string themoviedbid, int seasonNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -278,6 +278,16 @@ namespace Ombi.Api.TheMovieDb
|
||||||
return await Api.Request<TvInfo>(request);
|
return await Api.Request<TvInfo>(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<TvSeason> GetTVSeasonInfo(string themoviedbid, int seasonNumber)
|
||||||
|
{
|
||||||
|
var request = new Request($"/tv/{themoviedbid}/season/{seasonNumber}", BaseUri, HttpMethod.Get);
|
||||||
|
request.AddQueryString("api_key", ApiToken);
|
||||||
|
request.AddQueryString("append_to_response", "external_ids");
|
||||||
|
AddRetry(request);
|
||||||
|
|
||||||
|
return await Api.Request<TvSeason>(request);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<Keyword>> SearchKeyword(string searchTerm)
|
public async Task<List<Keyword>> SearchKeyword(string searchTerm)
|
||||||
{
|
{
|
||||||
var request = new Request("search/keyword", BaseUri, HttpMethod.Get);
|
var request = new Request("search/keyword", BaseUri, HttpMethod.Get);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue