示例#1
0
        private static IEnumerator _apiCallTagCollection(string uri, DelegateTagCollectionAnswer delegateSearch)
        {
            WWW www = new WWW(TenorAPIUri + uri);

            yield return(www);

            if (www.error == "" || www.error == null)
            {
                ResultTags data = JsonUtility.FromJson <ResultTags>(www.text);
                if (delegateSearch != null)
                {
                    delegateSearch(data);
                }
            }
            else
            {
                throw new Exception(www.error);
            }
        }
示例#2
0
 // Method to call API End Point: Tags https://tenor.com/gifapi#tags
 public static IEnumerator Tags(TagRequest request, DelegateTagCollectionAnswer delegateTags)
 {
     return(_apiCallTagCollection(request.getQueryString(key), delegateTags));
 }