Exemple #1
0
        /// <summary>
        /// Get repository info from GitHub based on the passed in username
        /// </summary>
        public async Task <List <RepoResponse> > GetUserRepoInformation(string username)
        {
            string url = WebConfigHelper.GetUsersReposEndpoint(username);
            List <RepoResponse> userRepoResponse = await WebRequestHelper.GetResponseAsync <List <RepoResponse> >(url);

            // Order by star gazers count descending then take the top [x] amount as set in the web config.
            return(userRepoResponse.OrderByDescending(repo => repo.StargazersCount).Take(WebConfigHelper.GetNumberOfReposToDisplay()).ToList());
        }