Ejemplo n.º 1
0
    public IEnumerator getAllSponsors()
    {
        //temporary until badawy gives us another endpoint
        string uri = baseUrl + "/api/products/sponsors_list";

        SponsorsResult res = new SponsorsResult();

        UnityWebRequest www = UnityWebRequest.Get(uri);

        www.SetRequestHeader("Authorization", authInfo.token_type + " " + authInfo.access_token);
        www.SetRequestHeader("customerId", "1");
        www.SetRequestHeader("Content-Type", "application/json");
        www.SetRequestHeader("LanguageId", "1");

        transmitting = true;

        yield return(www.SendWebRequest());

        res = JsonUtility.FromJson <SponsorsResult>(www.downloadHandler.text);
        if (res != null)
        {
            Cache.Instance.cacheAllSponsors(res);
        }

        transmitting = false;
    }
Ejemplo n.º 2
0
        public async Task <IActionResult> SponsorsByCity(Guid cityId)
        {
            var res = new SponsorsResult();

            return(Json(res));
        }
Ejemplo n.º 3
0
 public void cacheAllSponsors(SponsorsResult sponsorsResult)
 {
     cachedData.allSponsors = sponsorsResult.sponsorList;
 }