internal string GetJsonFromYouTube()
        {
            if (!CanGetPlaylistFromJSON())
            {
                return(null);
            }

            var parameters = new Dictionary <string, string>
            {
                //Store API Key
                ["key"] = APIKey,
                //Store the Playlisy ID
                ["playlistId"] = playListID,
                //Get only the info in this part
                ["part"] = "snippet",
                //get on the info in this feild for this part
                //["fields"] = "pageInfo, items/snippet(title)", //removed this to get more info. Leaving for reference
                //Max number of video you can pull
                ["maxResults"] = videoListSize.ToString()
            };

            //Create full URL with API key
            var fullUrl = MakeUrlWithQuery(parameters);

            WebReader webReader = new WebReader();
            string    json      = null;

            json = webReader.ReadText_FromURL(fullUrl);
            return(json);
        }
Ejemplo n.º 2
0
        private string GetGitText()
        {
            WebReader reader  = new WebReader();
            var       gitText = reader.ReadText_FromURL(GitReleasesURL, maxTries: 50);

            return(gitText);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get the text from the GitApiReleasesUrl
        /// </summary>
        /// <returns>The text on the page from the url</returns>
        private string GetGitApiText()
        {
            WebReader reader = new WebReader();

            AquiredGitApiText = reader.ReadText_FromURL(GitApiReleasesURL);
            return(AquiredGitApiText);
        }