Duncan Tourolle ed4cc0990c
All checks were successful
🏗️ Build Plugin / build (push) Successful in 2m47s
🧪 Test Plugin / test (push) Successful in 1m22s
🚀 Release Plugin / build-and-release (push) Successful in 2m39s
mixed refactor
2025-12-06 20:18:43 +01:00

74 lines
2.6 KiB
C#

namespace Jellyfin.Plugin.SRFPlay.Constants;
/// <summary>
/// Centralized API endpoints and URL templates used throughout the plugin.
/// </summary>
public static class ApiEndpoints
{
/// <summary>
/// SRG SSR Integration Layer API base URL.
/// Used for fetching media compositions, video metadata, and stream URLs.
/// </summary>
public const string IntegrationLayerBaseUrl = "https://il.srgssr.ch/integrationlayer/2.0";
/// <summary>
/// Play V3 API URL template. Format: {0} = business unit (srf, rts, rsi, rtr, swi).
/// Used for fetching shows, topics, and latest content.
/// </summary>
public const string PlayV3BaseUrlTemplate = "https://www.{0}.ch/play/v3/api/{0}/production/";
/// <summary>
/// Akamai token authentication endpoint.
/// Used to get hdnts tokens for stream authentication.
/// </summary>
public const string AkamaiTokenEndpoint = "https://tp.srgssr.ch/akahd/token";
/// <summary>
/// SRF Play homepage URL.
/// </summary>
public const string SrfPlayHomepage = "https://www.srf.ch/play";
/// <summary>
/// Media composition endpoint template (relative to IntegrationLayerBaseUrl).
/// Format: {0} = URN.
/// </summary>
public const string MediaCompositionByUrnPath = "/mediaComposition/byUrn/{0}.json";
/// <summary>
/// Base proxy route for stream proxying (relative to server root).
/// </summary>
public const string ProxyBasePath = "/Plugins/SRFPlay/Proxy";
/// <summary>
/// HLS master manifest route template (relative to server root).
/// Format: {0} = item ID.
/// </summary>
public const string ProxyMasterManifestPath = "/Plugins/SRFPlay/Proxy/{0}/master.m3u8";
/// <summary>
/// Image proxy route template (relative to server root).
/// Format: {0} = base64-encoded original URL.
/// </summary>
public const string ImageProxyPath = "/Plugins/SRFPlay/Image/{0}";
/// <summary>
/// Play V3 shows endpoint (relative to PlayV3 base URL).
/// </summary>
public const string PlayV3ShowsPath = "shows";
/// <summary>
/// Play V3 topics endpoint (relative to PlayV3 base URL).
/// </summary>
public const string PlayV3TopicsPath = "topics";
/// <summary>
/// Play V3 livestreams endpoint (relative to PlayV3 base URL).
/// </summary>
public const string PlayV3LivestreamsPath = "livestreams";
/// <summary>
/// Play V3 scheduled livestreams endpoint (relative to PlayV3 base URL).
/// </summary>
public const string PlayV3ScheduledLivestreamsPath = "scheduled-livestreams";
}