diff --git a/Git.hub/Client.cs b/Git.hub/Client.cs index d6475e4..0bf7922 100644 --- a/Git.hub/Client.cs +++ b/Git.hub/Client.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using RestSharp; using RestSharp.Authenticators; @@ -148,7 +149,7 @@ public User getCurrentUser() return user.Data; } - public User GetUser(string userName) + public async Task GetUserAsync(string userName) { if (string.IsNullOrEmpty(userName)) { @@ -157,7 +158,7 @@ public User GetUser(string userName) var request = new RestRequest($"/users/{userName}"); - var user = client.Get(request); + var user = await client.ExecuteGetTaskAsync(request); return user.Data; }