예제 #1
0
        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);
        }
예제 #2
0
        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);
        }