IEnumerable <User> ListUsers() { Console.WriteLine("---List Users---"); ApiResultHttpClientHelper <IEnumerable <User> > client = new ApiResultHttpClientHelper <IEnumerable <User> >(); client.Url = String.Format("{0}User", clo.apiUrl); client.AccessToken = accessToken; client.BaseAddress = clo.apiUrl; var users = client.GetApiResult(); DumpHelper.DumpUsers(users, 10); return(users); }
User AccessCurrentUser() { Console.WriteLine("---Current User---"); ApiResultHttpClientHelper <User> client = new ApiResultHttpClientHelper <User>(); client.Url = String.Format("{0}me", clo.apiUrl); client.AccessToken = accessToken; client.BaseAddress = clo.apiUrl; var user = client.GetApiResult(); DumpHelper.DumpUsers(new List <User> { user }); return(user); }