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); }); }
/// <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)); }