public async Task <IEntry <GitHubContact> > FetchAsync(ulong id) { try { return(_entryFactory.Create( await _client.GetAsync <GitHubContact>($"user/{id}") )); } catch (GitHubException e) { if (e.Response.StatusCode == HttpStatusCode.NotFound) { throw new ContactNotFoundException <GitHubContact>(e); } throw; } }
public async Task <IGitHubUser> GetAuthenticatedUser(string accessToken) { return(await _client.GetAsync <GitHubUser>(accessToken, "/user")); }
public Task <GitHubUser> GetUser(string name) { return(_client.GetAsync <GitHubUser>($@"users/{name}")); }