Files
ersatztv/ErsatzTV.Infrastructure/Plex/IPlexTvApi.cs
T
Jason DoveandGitHub aa938baec8 enable plex for movies (#72)
* re-enable plex, temp force secure connections

* add plex fanart

* synchronize genre from plex

* fix plex library sync

* improve stream error handling

* synchronize plex artwork

* use switch instead of button

* prioritize local connections for insecure plex sources

* sign out of plex

* better plex sign in/out

* code cleanup

* fix plex movie aspect ratio and scan type
2021-03-13 21:04:54 +00:00

47 lines
1.4 KiB
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using ErsatzTV.Infrastructure.Plex.Models;
using Refit;
namespace ErsatzTV.Infrastructure.Plex
{
[Headers("Accept: application/json")]
public interface IPlexTvApi
{
[Post("/pins")]
Task<PlexPinResponse> StartPinFlow(
[Query] [AliasAs("X-Plex-Product")]
string product,
[Query] [AliasAs("X-Plex-Client-Identifier")]
string clientIdentifier,
[Query]
bool strong = true);
[Get("/pins/{id}")]
Task<PlexTokenResponse> GetPinStatus(
int id,
[Query]
string code,
[Query] [AliasAs("X-Plex-Client-Identifier")]
string clientIdentifier);
[Get("/user")]
Task<PlexUserResponse> GetUser(
[Query] [AliasAs("X-Plex-Product")]
string product,
[Query] [AliasAs("X-Plex-Client-Identifier")]
string clientIdentifier,
[Query] [AliasAs("X-Plex-Token")]
string token);
[Get("/resources")]
Task<List<PlexResource>> GetResources(
[Query] [AliasAs("includeHttps")]
int includeHttps,
[Header("X-Plex-Client-Identifier")]
string clientIdentifier,
[Header("X-Plex-Token")]
string token);
}
}