mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 16:52:56 -07:00
#150 sonarr/sickrage cache checking. sickrage has a couple small items left
This commit is contained in:
parent
35310d35ed
commit
5f67302b32
17 changed files with 332 additions and 9 deletions
|
@ -38,6 +38,7 @@ using PlexRequests.Api.Interfaces;
|
|||
using PlexRequests.Api.Models.SickRage;
|
||||
using PlexRequests.Helpers;
|
||||
using RestSharp;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace PlexRequests.Api
|
||||
{
|
||||
|
@ -206,5 +207,25 @@ namespace PlexRequests.Api
|
|||
return result;
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<SickRageTvAdd> GetShows(string apiKey, Uri baseUrl) // TODO: get the correct response/models from SR
|
||||
{
|
||||
var request = new RestRequest
|
||||
{
|
||||
Resource = "/api/{apiKey}/?cmd=shows",
|
||||
Method = Method.GET
|
||||
};
|
||||
request.AddUrlSegment("apiKey", apiKey);
|
||||
|
||||
//await Task.Run(() => Thread.Sleep(2000));
|
||||
//return await Task.Run(() =>
|
||||
//{
|
||||
//Log.Trace("Entering `Execute<SickRageTvAdd>` in a new `Task<T>`");
|
||||
var result = Api.ExecuteJson<JObject>(request, baseUrl);
|
||||
|
||||
//Log.Trace("Exiting `Execute<SickRageTvAdd>` and yeilding `Task<T>` result");
|
||||
return null;
|
||||
//}).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue