Exemplo n.º 1
0
        /// <summary>
        /// <para>Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access
        /// token.</para>
        /// </summary>
        /// <param name="oauth1Token">The supplied OAuth 1.0 access token.</param>
        /// <param name="oauth1TokenSecret">The token secret associated with the supplied
        /// access token.</param>
        /// <returns>The task that represents the asynchronous send operation. The TResult
        /// parameter contains the response from the server.</returns>
        /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
        /// processing the request; This will contain a <see
        /// cref="TokenFromOAuth1Error"/>.</exception>
        public t.Task <TokenFromOAuth1Result> TokenFromOauth1Async(string oauth1Token,
                                                                   string oauth1TokenSecret)
        {
            var tokenFromOAuth1Arg = new TokenFromOAuth1Arg(oauth1Token,
                                                            oauth1TokenSecret);

            return(this.TokenFromOauth1Async(tokenFromOAuth1Arg));
        }
Exemplo n.º 2
0
        /// <summary>
        /// <para>Begins an asynchronous send to the token from oauth1 route.</para>
        /// </summary>
        /// <param name="oauth1Token">The supplied OAuth 1.0 access token.</param>
        /// <param name="oauth1TokenSecret">The token secret associated with the supplied
        /// access token.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="callbackState">A user provided object that distinguished this send
        /// from other send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginTokenFromOauth1(string oauth1Token,
                                                     string oauth1TokenSecret,
                                                     sys.AsyncCallback callback,
                                                     object callbackState = null)
        {
            var tokenFromOAuth1Arg = new TokenFromOAuth1Arg(oauth1Token,
                                                            oauth1TokenSecret);

            return(this.BeginTokenFromOauth1(tokenFromOAuth1Arg, callback, callbackState));
        }
Exemplo n.º 3
0
        /// <summary>
        /// <para>Begins an asynchronous send to the token from oauth1 route.</para>
        /// </summary>
        /// <param name="tokenFromOAuth1Arg">The request parameters.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="state">A user provided object that distinguished this send from other
        /// send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginTokenFromOauth1(TokenFromOAuth1Arg tokenFromOAuth1Arg, sys.AsyncCallback callback, object state = null)
        {
            var task = this.TokenFromOauth1Async(tokenFromOAuth1Arg);

            return(enc.Util.ToApm(task, callback, state));
        }
Exemplo n.º 4
0
 /// <summary>
 /// <para>Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access
 /// token.</para>
 /// </summary>
 /// <param name="tokenFromOAuth1Arg">The request parameters</param>
 /// <returns>The task that represents the asynchronous send operation. The TResult
 /// parameter contains the response from the server.</returns>
 /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
 /// processing the request; This will contain a <see
 /// cref="TokenFromOAuth1Error"/>.</exception>
 public t.Task <TokenFromOAuth1Result> TokenFromOauth1Async(TokenFromOAuth1Arg tokenFromOAuth1Arg)
 {
     return(this.Transport.SendRpcRequestAsync <TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error>(tokenFromOAuth1Arg, "api", "/auth/token/from_oauth1", "app", Dropbox.Api.Auth.TokenFromOAuth1Arg.Encoder, Dropbox.Api.Auth.TokenFromOAuth1Result.Decoder, Dropbox.Api.Auth.TokenFromOAuth1Error.Decoder));
 }