C# Class FlickrNet.Twitter

Afficher le fichier Open project: liquidboy/X Class Usage Examples

Private Properties

Свойство Type Description
CalculateAuthSignature string
CheckApiKey void
CheckRequiresAuthentication void
CheckSigned void
ConvertNonSeekableStreamToByteArray byte[]
CreateUploadData byte[]

Méthodes publiques

Méthode Description
CalculateUri ( string>.Dictionary parameters, bool includeSignature ) : Uri

Calculates the Flickr method cal URL based on the passed in parameters, and also generates the signature if required.

FlushCache ( ) : void

Clears the cache completely.

FlushCache ( Uri url ) : void

Clears the cache for a particular URL.

The URL can either be an image URL for a downloaded picture, or a request URL (see LastRequest for getting the last URL).

FlushCache ( string url ) : void

Clears the cache for a particular URL.

The URL can either be an image URL for a downloaded picture, or a request URL (see LastRequest for getting the last URL).

OAuthCalculateAuthorizationUrl ( string requestToken, AuthLevel perms ) : string

Returns the authorization URL for OAuth authorization, based off the request token and permissions provided.

OAuthCalculateSignature ( string method, string url, string>.Dictionary parameters, string tokenSecret ) : string

Calculates the signature for an OAuth call.

OAuthCalculateSignatureForCalls ( string method, string url, string>.Dictionary parameters, string tokenSecret ) : string
OAuthGetAccessTokenAsync ( OAuthRequestToken requestToken, string verifier ) : Task>

Returns an access token for the given request token, secret and authorization verifier.

OAuthGetAccessTokenAsync ( string requestToken, string requestTokenSecret, string verifier ) : Task>

For a given request token and verifier string return an access token.

OAuthGetBasicParameters ( ) : string>.Dictionary

Returns a new dictionary containing the basic OAuth parameters.

OAuthGetBasicParameters ( string>.Dictionary parameters ) : void

Populates the given dictionary with the basic OAuth parameters, oauth_timestamp, oauth_noonce etc.

OAuthGetRequestTokenAsync ( string callbackUrl ) : Task>

Get an OAuthRequestToken for the given callback URL.

Specify 'oob' as the callback url for no callback to be performed.

Twitter ( ) : System

Constructor loads configuration settings from app.config or web.config file if they exist.

Twitter ( string apiKey ) : System

Create a new instance of the Flickr class with no authentication.

Twitter ( string apiKey, string sharedSecret ) : System

Creates a new instance of the Flickr class with an API key and a Shared Secret. This is only useful really useful for calling the Auth functions as all other authenticationed methods also require the API Token.

Twitter ( string apiKey, string sharedSecret, string token ) : System

Create a new instance of the Flickr class with the email address and password given

Private Methods

Méthode Description
CalculateAuthSignature ( string>.Dictionary parameters ) : string
CheckApiKey ( ) : void
CheckRequiresAuthentication ( ) : void
CheckSigned ( ) : void
ConvertNonSeekableStreamToByteArray ( Stream nonSeekableStream ) : byte[]
CreateUploadData ( Stream imageStream, string fileName, string>.Dictionary parameters, string boundary ) : byte[]

Method Details

CalculateUri() public méthode

Calculates the Flickr method cal URL based on the passed in parameters, and also generates the signature if required.
public CalculateUri ( string>.Dictionary parameters, bool includeSignature ) : Uri
parameters string>.Dictionary A Dictionary containing a list of parameters to add to the method call.
includeSignature bool Boolean use to decide whether to generate the api call signature as well.
Résultat System.Uri

FlushCache() public static méthode

Clears the cache completely.
public static FlushCache ( ) : void
Résultat void

FlushCache() public static méthode

Clears the cache for a particular URL.
The URL can either be an image URL for a downloaded picture, or a request URL (see LastRequest for getting the last URL).
public static FlushCache ( Uri url ) : void
url System.Uri The URL to remove from the cache.
Résultat void

FlushCache() public static méthode

Clears the cache for a particular URL.
The URL can either be an image URL for a downloaded picture, or a request URL (see LastRequest for getting the last URL).
public static FlushCache ( string url ) : void
url string The URL to remove from the cache.
Résultat void

OAuthCalculateAuthorizationUrl() public méthode

Returns the authorization URL for OAuth authorization, based off the request token and permissions provided.
public OAuthCalculateAuthorizationUrl ( string requestToken, AuthLevel perms ) : string
requestToken string The request token to include in the authorization url.
perms AuthLevel The permissions being requested.
Résultat string

OAuthCalculateSignature() public méthode

Calculates the signature for an OAuth call.
public OAuthCalculateSignature ( string method, string url, string>.Dictionary parameters, string tokenSecret ) : string
method string POST or GET method.
url string The URL the request will be sent to.
parameters string>.Dictionary Parameters to be added to the signature.
tokenSecret string The token secret (either request or access) for generating the SHA-1 key.
Résultat string

OAuthCalculateSignatureForCalls() public méthode

public OAuthCalculateSignatureForCalls ( string method, string url, string>.Dictionary parameters, string tokenSecret ) : string
method string
url string
parameters string>.Dictionary
tokenSecret string
Résultat string

OAuthGetAccessTokenAsync() public méthode

Returns an access token for the given request token, secret and authorization verifier.
public OAuthGetAccessTokenAsync ( OAuthRequestToken requestToken, string verifier ) : Task>
requestToken OAuthRequestToken
verifier string
Résultat Task>

OAuthGetAccessTokenAsync() public méthode

For a given request token and verifier string return an access token.
public OAuthGetAccessTokenAsync ( string requestToken, string requestTokenSecret, string verifier ) : Task>
requestToken string
requestTokenSecret string
verifier string
Résultat Task>

OAuthGetBasicParameters() public méthode

Returns a new dictionary containing the basic OAuth parameters.
public OAuthGetBasicParameters ( ) : string>.Dictionary
Résultat string>.Dictionary

OAuthGetBasicParameters() public méthode

Populates the given dictionary with the basic OAuth parameters, oauth_timestamp, oauth_noonce etc.
public OAuthGetBasicParameters ( string>.Dictionary parameters ) : void
parameters string>.Dictionary Dictionary to be populated with the OAuth parameters.
Résultat void

OAuthGetRequestTokenAsync() public méthode

Get an OAuthRequestToken for the given callback URL.
Specify 'oob' as the callback url for no callback to be performed.
public OAuthGetRequestTokenAsync ( string callbackUrl ) : Task>
callbackUrl string The callback Uri, or 'oob' if no callback is to be performed.
Résultat Task>

Twitter() public méthode

Constructor loads configuration settings from app.config or web.config file if they exist.
public Twitter ( ) : System
Résultat System

Twitter() public méthode

Create a new instance of the Flickr class with no authentication.
public Twitter ( string apiKey ) : System
apiKey string Your Flickr API Key.
Résultat System

Twitter() public méthode

Creates a new instance of the Flickr class with an API key and a Shared Secret. This is only useful really useful for calling the Auth functions as all other authenticationed methods also require the API Token.
public Twitter ( string apiKey, string sharedSecret ) : System
apiKey string Your Flickr API Key.
sharedSecret string Your Flickr Shared Secret.
Résultat System

Twitter() public méthode

Create a new instance of the Flickr class with the email address and password given
public Twitter ( string apiKey, string sharedSecret, string token ) : System
apiKey string Your Flickr API Key
sharedSecret string Your FLickr Shared Secret.
token string The token for the user who has been authenticated.
Résultat System