Exemple #1
0
        public static Task <GiphyQuerySearchResult> Search(GiphyConfig config, string query, int limit = 25, int offset = 0)
        {
            var requestUrl = $"https://{searchApiUrl}?api_key={config.apiKey}&q={UnityWebRequest.EscapeURL(query)}&limit={limit}&offset={offset}&rating={config.rating.ToQueryString()}&lang={config.lang}";

            return(Query <GiphyQuerySearchResult>(requestUrl));
        }
Exemple #2
0
        public static Task <GiphyQueryRandomResult> Random(GiphyConfig config, string tag)
        {
            var requestUrl = $"https://{randomApiUrl}?api_key={config.apiKey}&tag={UnityWebRequest.EscapeURL(tag)}&rating={config.rating.ToQueryString()}";

            return(Query <GiphyQueryRandomResult>(requestUrl));
        }