Files
ersatztv/ErsatzTV.Infrastructure/Jellyfin/IJellyfinApi.cs
T
Jason DoveandGitHub 68123a2f9c add content rating (#218)
* add new columns

* store local content ratings

* display and search content ratings

* add content_rating to search docs

* sync content rating from jellyfin, emby, plex

* force sync content rating for all libraries

* code cleanup
2021-05-27 06:41:24 -05:00

81 lines
2.5 KiB
C#

using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using ErsatzTV.Infrastructure.Jellyfin.Models;
using Refit;
namespace ErsatzTV.Infrastructure.Jellyfin
{
[Headers("Accept: application/json")]
public interface IJellyfinApi
{
[Get("/System/Info")]
public Task<JellyfinSystemInformationResponse> GetSystemInformation(
[Header("X-Emby-Token")]
string apiKey,
CancellationToken cancellationToken);
[Get("/Users")]
public Task<List<JellyfinUserResponse>> GetUsers(
[Header("X-Emby-Token")]
string apiKey);
[Get("/Library/VirtualFolders")]
public Task<List<JellyfinLibraryResponse>> GetLibraries(
[Header("X-Emby-Token")]
string apiKey);
[Get("/Items")]
public Task<JellyfinLibraryItemsResponse> GetMovieLibraryItems(
[Header("X-Emby-Token")]
string apiKey,
[Query]
string userId,
[Query]
string parentId,
[Query]
string fields = "Path,Genres,Tags,DateCreated,Etag,Overview,Taglines,Studios,People,OfficialRating",
[Query]
string includeItemTypes = "Movie");
[Get("/Items")]
public Task<JellyfinLibraryItemsResponse> GetShowLibraryItems(
[Header("X-Emby-Token")]
string apiKey,
[Query]
string userId,
[Query]
string parentId,
[Query]
string fields = "Path,Genres,Tags,DateCreated,Etag,Overview,Taglines,Studios,People,OfficialRating",
[Query]
string includeItemTypes = "Series");
[Get("/Items")]
public Task<JellyfinLibraryItemsResponse> GetSeasonLibraryItems(
[Header("X-Emby-Token")]
string apiKey,
[Query]
string userId,
[Query]
string parentId,
[Query]
string fields = "Path,DateCreated,Etag,Taglines",
[Query]
string includeItemTypes = "Season");
[Get("/Items")]
public Task<JellyfinLibraryItemsResponse> GetEpisodeLibraryItems(
[Header("X-Emby-Token")]
string apiKey,
[Query]
string userId,
[Query]
string parentId,
[Query]
string fields = "Path,DateCreated,Etag,Overview",
[Query]
string includeItemTypes = "Episode");
}
}