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>
    /// 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";
}
