Exemple #1
0
        public static List <string> LoadPreviousExtensionsChangelog()
        {
            var html = new List <string> {
                "<h1>Changelogs</h1>"
            };

            using (new HourGlass())
            {
                var webClient = new WebClient();
                WebClientHelper.SetHeaders(webClient);
                var releases =
                    JsonConvert.DeserializeObject <List <GitHubVersion> >(
                        webClient.DownloadString("https://api.github.com/repos/zachsaw/MPDN_Extensions/releases"));
                foreach (var gitHubVersion in releases)
                {
                    html.Add(String.Format("<h2>{0}</h2>", gitHubVersion.tag_name));
                    html.Add(CommonMarkConverter.Convert(gitHubVersion.body));
                }
            }
            return(html);
        }
 protected void PrepareWebClientRequest()
 {
     WebClientHelper.SetHeaders(m_WebClient);
 }
Exemple #3
0
 protected void SetHeaders()
 {
     WebClientHelper.SetHeaders(WebClient);
 }