namespace Knot.Shared.Kernel.Constants;

public static class Klipy
{
    public const string ResourceTrending = "gifs/trending";
    public const string ResourceSearch = "gifs/search";
    public const string ResourceRecent = "gifs/recent";
    public const string ResourceCategories = "gifs/categories";
    public const string ResourceShare = "gifs/{0}/share";

    public const string ApiUrlCo = "https://api.klipy.co/api/v1/{0}/{1}?page={2}&per_page={3}&{4}&customer_id={5}";
    public const string ApiUrlCom = "https://api.klipy.com/api/v1/{0}/{1}?page={2}&per_page={3}&{4}&customer_id={5}";
    
    // Categories use country_code
    public const string ApiUrlCategoriesCo = "https://api.klipy.co/api/v1/{0}/{1}?country_code={2}&customer_id={3}";
    public const string ApiUrlCategoriesCom = "https://api.klipy.com/api/v1/{0}/{1}?country_code={2}&customer_id={3}";

    // Share is POST
    public const string ApiUrlShareCo = "https://api.klipy.co/api/v1/{0}/gifs/{1}/share?q={2}&customer_id={3}";
    public const string ApiUrlShareCom = "https://api.klipy.com/api/v1/{0}/gifs/{1}/share?q={2}&customer_id={3}";

    public const int TrendingCacheMinutes = 60;
    public const int SearchCacheMinutes = 15;
    public const int CategoriesCacheMinutes = 1440; // 24 hours
    public const int RecentCacheMinutes = 5; // Frequent changes

    public const string DefaultCustomerId = "anonymous";
}
