Beispiel #1
0
        public void GetApiResponse()
        {
            string filename = "cache/" + plentry.Id + ".json";

            if (ISOHelper.FileExists(filename))
            {
                apijson = JObject.Parse(ISOHelper.ReadFromFile(filename));
                PopulateCollection(apijson);
            }
            else
            {
                string url = plentry.Source +
                             "&alt=json" +
                             "&fields=entry(id,title,link,media:group(yt:videoid,media:thumbnail,yt:duration))" +
                             "&access_token=" + IsolatedStorageSettings.ApplicationSettings["access_token"];
                GET(url);
            }
        }
Beispiel #2
0
        private void GetApiResponse()
        {
            string filename;

            IsolatedStorageSettings.ApplicationSettings.TryGetValue("cache_filename", out filename);
            if (ISOHelper.FileExists(filename))
            {
                apijson = JObject.Parse(ISOHelper.ReadFromFile(filename));
                PopulateCollection(apijson);
            }
            else
            {
                string url = "https://gdata.youtube.com/feeds/mobile/users/default/playlists?" +
                             "v=2&alt=json" +
                             "&fields=author,entry(yt:playlistId,content,title,yt:countHint,updated,media:group(media:thumbnail))" +
                             "&access_token=" + IsolatedStorageSettings.ApplicationSettings["access_token"];
                GET(url);
            }
        }