C# Class CoreTweet.Tokens

Represents the OAuth tokens.
Inheritance: TokensBase
Mostra file Open project: CoreTweet/CoreTweet Class Usage Examples

Public Methods

Method Description
Create ( string consumerKey, string consumerSecret, string accessToken, string accessSecret, long userID, string screenName = null ) : Tokens

Makes an instance of Tokens. Tokens.Create will not fetch UserId and ScreenName automatically. If you need them, call Rest.Account.VerifyCredentials(object).

CreateAuthorizationHeader ( MethodType type, Uri url, object>.IEnumerable parameters ) : string

Creates a string for Authorization header for OAuth 1.0A.

ToString ( ) : string

Returns a string that represents the current Tokens.

Tokens ( ) : System

Initializes a new instance of the Tokens class.

Tokens ( Tokens e ) : System

Initializes a new instance of the Tokens class with a specified token.

Method Details

Create() public static method

Makes an instance of Tokens. Tokens.Create will not fetch UserId and ScreenName automatically. If you need them, call Rest.Account.VerifyCredentials(object).
public static Create ( string consumerKey, string consumerSecret, string accessToken, string accessSecret, long userID, string screenName = null ) : Tokens
consumerKey string The consumer key.
consumerSecret string The consumer secret.
accessToken string The access token.
accessSecret string The access secret.
userID long The user's ID.
screenName string The user's screen name.
return Tokens

CreateAuthorizationHeader() public method

Creates a string for Authorization header for OAuth 1.0A.
public CreateAuthorizationHeader ( MethodType type, Uri url, object>.IEnumerable parameters ) : string
type MethodType The Type of HTTP request.
url System.Uri The URL.
parameters object>.IEnumerable The parameters.
return string

ToString() public method

Returns a string that represents the current Tokens.
public ToString ( ) : string
return string

Tokens() public method

Initializes a new instance of the Tokens class.
public Tokens ( ) : System
return System

Tokens() public method

Initializes a new instance of the Tokens class with a specified token.
public Tokens ( Tokens e ) : System
e Tokens The token.
return System