mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 03:28:28 -07:00
parent
1813b45fb3
commit
560072eba4
33 changed files with 279 additions and 91 deletions
|
@ -18,7 +18,7 @@ namespace Ombi.Api.Plex
|
|||
|
||||
private const string SignInUri = "https://plex.tv/users/sign_in.json";
|
||||
private const string FriendsUri = "https://plex.tv/pms/friends/all";
|
||||
private const string GetAccountUri = "https://plex.tv/users/account";
|
||||
private const string GetAccountUri = "https://plex.tv/users/account.json";
|
||||
private const string ServerUri = "https://plex.tv/pms/servers.xml";
|
||||
|
||||
/// <summary>
|
||||
|
@ -52,6 +52,13 @@ namespace Ombi.Api.Plex
|
|||
return await Api.Request<PlexStatus>(request);
|
||||
}
|
||||
|
||||
public async Task<PlexAccount> GetAccount(string authToken)
|
||||
{
|
||||
var request = new Request(GetAccountUri, string.Empty, HttpMethod.Get);
|
||||
AddHeaders(request, authToken);
|
||||
return await Api.Request<PlexAccount>(request);
|
||||
}
|
||||
|
||||
public async Task<PlexServer> GetServer(string authToken)
|
||||
{
|
||||
var request = new Request(ServerUri, string.Empty, HttpMethod.Get, ContentType.Xml);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue