mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Added the application tester for CP #9
This commit is contained in:
parent
334a6f3d8e
commit
4c0884999e
9 changed files with 175 additions and 3 deletions
|
@ -30,6 +30,8 @@ using Newtonsoft.Json.Linq;
|
|||
|
||||
using NLog;
|
||||
using PlexRequests.Api.Interfaces;
|
||||
using PlexRequests.Api.Models.Movie;
|
||||
|
||||
using RestSharp;
|
||||
|
||||
namespace PlexRequests.Api
|
||||
|
@ -71,5 +73,25 @@ namespace PlexRequests.Api
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status.
|
||||
/// </summary>
|
||||
/// <param name="url">The URL.</param>
|
||||
/// <param name="apiKey">The API key.</param>
|
||||
/// <returns></returns>
|
||||
public CouchPotatoStatus GetStatus(Uri url, string apiKey)
|
||||
{
|
||||
Log.Trace("Getting CP Status, ApiKey = {0}", apiKey);
|
||||
var request = new RestRequest
|
||||
{
|
||||
Resource = "api/{apikey}/app.available/",
|
||||
Method = Method.GET
|
||||
};
|
||||
|
||||
request.AddUrlSegment("apikey", apiKey);
|
||||
|
||||
return Api.Execute<CouchPotatoStatus>(request,url);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue