예제 #1
0
 private Task<IDictionary<string, string>> GetRequestToken(IRestClient client)
 {
     return
         client
             .ExecutTaskAsync(new RestRequest("request_token"))
             .ContinueWith(task => task.Result.Content)
             .ParseQueryString();
 }
예제 #2
0
        private Task<IDictionary<string, string>> GetAccessToken(IRestClient client)
        {
            Debug.Assert(client.Authenticator is OAuth1Authenticator);

            return
                client
                    .ExecutTaskAsync(new RestRequest("access_token"))
                    .ContinueWith(task => task.Result.Content)
                    .ParseQueryString();
        }