Пример #1
0
        /// <summary>
        /// Parses gitApi text and gets the latest release version of the program the gitApi text is for
        /// </summary>
        /// <param name="aquiredGitText">The text that was successfully read from github</param>
        /// <returns>an int of the latest release version, as a whole number without decimals</returns>
        public static string GetLatestVersion(string aquiredGitText)
        {
            var    gitApi        = GithubReleaseConfig.FromJson(aquiredGitText);
            string latestRelease = gitApi[0].TagName;

            return(latestRelease);
        }
Пример #2
0
        /// <summary>
        /// Reads gitApi text and gets all of the download urls associated with the latest release
        /// </summary>
        /// <returns>a list of download url strings</returns>
        private List <string> GetDownloadURLs()
        {
            List <string> downloads = new List <string>();
            var           gitApi    = GithubReleaseConfig.FromJson(VersionTextFromWeb);

            foreach (var a in gitApi[0].Assets)
            {
                downloads.Add(a.BrowserDownloadUrl.ToString());
            }

            return(downloads);
        }