Esempio n. 1
0
        public static void ParseCollection(string url, Action <JToken> HandleElement)
        {
            string httpResponse = RequestSender.Get(url);

            JArray array = JArray.Parse(httpResponse);

            array.ToList().ForEach(token =>
            {
                HandleElement?.Invoke(token);
            });
        }
Esempio n. 2
0
        /// <summary>
        /// Retrieves basic information about specified User.
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        public GitHubUser GetUserInformation(string username)
        {
            string httpResponse = RequestSender.Get($"{ Constants.UrlUsers }/{ username }");

            return(new GitHubUser(httpResponse));
        }