C# Класс FlickrNet.Twitter

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CalculateAuthSignature string
CheckApiKey void
CheckRequiresAuthentication void
CheckSigned void
ConvertNonSeekableStreamToByteArray byte[]
CreateUploadData byte[]

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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[]

Описание методов

CalculateUri() публичный Метод

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.
Результат System.Uri

FlushCache() публичный статический Метод

Clears the cache completely.
public static FlushCache ( ) : void
Результат void

FlushCache() публичный статический Метод

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.
Результат void

FlushCache() публичный статический Метод

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.
Результат void

OAuthCalculateAuthorizationUrl() публичный Метод

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.
Результат string

OAuthCalculateSignature() публичный Метод

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.
Результат string

OAuthCalculateSignatureForCalls() публичный Метод

public OAuthCalculateSignatureForCalls ( string method, string url, string>.Dictionary parameters, string tokenSecret ) : string
method string
url string
parameters string>.Dictionary
tokenSecret string
Результат string

OAuthGetAccessTokenAsync() публичный Метод

Returns an access token for the given request token, secret and authorization verifier.
public OAuthGetAccessTokenAsync ( OAuthRequestToken requestToken, string verifier ) : Task>
requestToken OAuthRequestToken
verifier string
Результат Task>

OAuthGetAccessTokenAsync() публичный Метод

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
Результат Task>

OAuthGetBasicParameters() публичный Метод

Returns a new dictionary containing the basic OAuth parameters.
public OAuthGetBasicParameters ( ) : string>.Dictionary
Результат string>.Dictionary

OAuthGetBasicParameters() публичный Метод

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.
Результат void

OAuthGetRequestTokenAsync() публичный Метод

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.
Результат Task>

Twitter() публичный Метод

Constructor loads configuration settings from app.config or web.config file if they exist.
public Twitter ( ) : System
Результат System

Twitter() публичный Метод

Create a new instance of the Flickr class with no authentication.
public Twitter ( string apiKey ) : System
apiKey string Your Flickr API Key.
Результат System

Twitter() публичный Метод

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.
Результат System

Twitter() публичный Метод

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.
Результат System