Esempio n. 1
0
 //-------------------------------------------------------------------------------------------------------------
 public void GetTinyURL(ShowMyAppDelegateURL sDelegate)
 {
     if (TinyURLRequest == false)
     {
         TinyURLRequest = true;
         StartCoroutine(GetTinyURLAsync(sDelegate));
     }
 }
Esempio n. 2
0
 //-------------------------------------------------------------------------------------------------------------
 #region Get URL
 public void GetURL(ShowMyAppDelegateURL sDelegate)
 {
     if (Tiny == true)
     {
         GetTinyURL(sDelegate);
     }
     else
     {
         GetFullURL(sDelegate);;
     }
 }
Esempio n. 3
0
        //-------------------------------------------------------------------------------------------------------------
        private IEnumerator GetTinyURLAsync(ShowMyAppDelegateURL sDelegate)
        {
            string tURI = website + "url.php?t=1&" + GetParam();

            Debug.Log("GetTinyURLAsync() => tURI = " + tURI);
            UnityWebRequest www = UnityWebRequest.Get(tURI);

            yield return(www.SendWebRequest());

            if (www.isNetworkError || www.isHttpError)
            {
                Debug.Log(www.error);
            }
            else
            {
                TinyURL = www.downloadHandler.text;
                Debug.Log("GetTinyURLAsync() => tURI result = " + TinyURL);
                sDelegate?.Invoke(TinyURL);
            }
            TinyURLRequest = false;
        }
Esempio n. 4
0
        //-------------------------------------------------------------------------------------------------------------
        public void GetFullURL(ShowMyAppDelegateURL sDelegate)
        {
            string rReturn = website + "r.php?" + GetParam();

            sDelegate(rReturn);
        }