C# Class Hyves.Service.Core.HyvesRequest

Represents a request used to invoke a Hyves API method.
显示文件 Open project: Sitecore/Hyves-network-provider-for-Sitecore-Social-Connected-1.3 Class Usage Examples

Public Methods

Method Description
BeginCreateAccessToken ( string requestToken, string requestTokenSecret, AsyncCallback callback, object asyncState ) : IAsyncResult

Starts an asynchronous call to create a session. This corresponds to the Hyves auth.accesstoken method.

BeginCreateRequestToken ( HyvesExpirationType expirationType, AsyncCallback callback, object asyncState ) : IAsyncResult

Starts an asynchronous call to create an authorization token. This corresponds to the Hyves auth.createToken method.

BeginInvokeMethod ( HyvesMethod method, AsyncCallback callback, object asyncState ) : IAsyncResult

Starts an asynchronous call to invoke the specified method.

CreateAccessToken ( string requestToken, string requestTokenSecret, string &tokenSecret, string &userId, System.DateTime &expireDate ) : string

Creates a new access token. This corresponds to the Hyves auth.accesstoken method.

CreateRequestToken ( string &tokenSecret, HyvesExpirationType expirationType ) : string

Creates a request token. This corresponds to the Hyves auth.requesttoken method.

EndCreateAccessToken ( IAsyncResult asyncResult, string &tokenSecret, string &userId, System.DateTime &expireDate ) : string

Completes an asynchronous call to create an new access token.

EndCreateRequestToken ( IAsyncResult asyncResult, string &requestTokenSecret ) : string

Completes an asynchronous call to create an request token.

EndInvokeMethod ( IAsyncResult asyncResult ) : HyvesResponse

Completes an asynchronous call to invoke an API method.

HyvesRequest ( HyvesSession session ) : System

Creates an new instance of a request with the specified session.

InvokeMethod ( HyvesMethod method ) : HyvesResponse

Invokes the specified API method.

InvokeMethod ( HyvesMethod method, bool useFancyLayout ) : HyvesResponse

Invokes the specified API method.

InvokeMethod ( HyvesMethod method, bool useFancyLayout, int page, int resultsPerPage ) : HyvesResponse

Invokes the specified API method.

Private Methods

Method Description
CreateRequest ( HyvesMethod method, HyvesSession session, HyvesRequestParameterList parameters ) : HttpWebRequest
CreateRequest ( HyvesMethod method, bool useFancyLayout, HyvesSession session, HyvesRequestParameterList parameters ) : HttpWebRequest
CreateRequest ( HyvesMethod method, bool useFancyLayout, int page, int resultsPerPage, HyvesSession session, HyvesRequestParameterList parameters ) : HttpWebRequest
CreateRequest ( string requestToken, string requestTokenSecret, HyvesExpirationType expirationType, HyvesSession session ) : HttpWebRequest

Method Details

BeginCreateAccessToken() public method

Starts an asynchronous call to create a session. This corresponds to the Hyves auth.accesstoken method.
public BeginCreateAccessToken ( string requestToken, string requestTokenSecret, AsyncCallback callback, object asyncState ) : IAsyncResult
requestToken string The authorization token to use to create the session.
requestTokenSecret string
callback AsyncCallback The async callback that is invoked when the request completes.
asyncState object The state to associate with the asynchronous call.
return IAsyncResult

BeginCreateRequestToken() public method

Starts an asynchronous call to create an authorization token. This corresponds to the Hyves auth.createToken method.
public BeginCreateRequestToken ( HyvesExpirationType expirationType, AsyncCallback callback, object asyncState ) : IAsyncResult
expirationType HyvesExpirationType
callback AsyncCallback The async callback that is invoked when the request completes.
asyncState object The state to associate with the asynchronous call.
return IAsyncResult

BeginInvokeMethod() public method

Starts an asynchronous call to invoke the specified method.
public BeginInvokeMethod ( HyvesMethod method, AsyncCallback callback, object asyncState ) : IAsyncResult
method HyvesMethod The name of the API method to invoke.
callback AsyncCallback The async callback that is invoked when the request completes.
asyncState object The state to associate with the asynchronous call.
return IAsyncResult

CreateAccessToken() public method

Creates a new access token. This corresponds to the Hyves auth.accesstoken method.
public CreateAccessToken ( string requestToken, string requestTokenSecret, string &tokenSecret, string &userId, System.DateTime &expireDate ) : string
requestToken string The request token to use to create the access token.
requestTokenSecret string The request token secret to use to sign the request.
tokenSecret string
userId string The user Id associated with the session.
expireDate System.DateTime Date when the created access token expireDate.
return string

CreateRequestToken() public method

Creates a request token. This corresponds to the Hyves auth.requesttoken method.
public CreateRequestToken ( string &tokenSecret, HyvesExpirationType expirationType ) : string
tokenSecret string
expirationType HyvesExpirationType
return string

EndCreateAccessToken() public method

Completes an asynchronous call to create an new access token.
public EndCreateAccessToken ( IAsyncResult asyncResult, string &tokenSecret, string &userId, System.DateTime &expireDate ) : string
asyncResult IAsyncResult The async result from the corresponding BeginCreateAccessToken call.
tokenSecret string
userId string The user Id associated with the access token.
expireDate System.DateTime Date when the created access token expireDate.
return string

EndCreateRequestToken() public method

Completes an asynchronous call to create an request token.
public EndCreateRequestToken ( IAsyncResult asyncResult, string &requestTokenSecret ) : string
asyncResult IAsyncResult The async result from the corresponding BeginCreateRequestToken call.
requestTokenSecret string
return string

EndInvokeMethod() public method

Completes an asynchronous call to invoke an API method.
public EndInvokeMethod ( IAsyncResult asyncResult ) : HyvesResponse
asyncResult IAsyncResult The async result from the corresponding BeginCreateAccessToken call.
return HyvesResponse

HyvesRequest() public method

Creates an new instance of a request with the specified session.
public HyvesRequest ( HyvesSession session ) : System
session HyvesSession The session to use to issue the request.
return System

InvokeMethod() public method

Invokes the specified API method.
public InvokeMethod ( HyvesMethod method ) : HyvesResponse
method HyvesMethod The name of the API method to invoke.
return HyvesResponse

InvokeMethod() public method

Invokes the specified API method.
public InvokeMethod ( HyvesMethod method, bool useFancyLayout ) : HyvesResponse
method HyvesMethod The name of the API method to invoke.
useFancyLayout bool
return HyvesResponse

InvokeMethod() public method

Invokes the specified API method.
public InvokeMethod ( HyvesMethod method, bool useFancyLayout, int page, int resultsPerPage ) : HyvesResponse
method HyvesMethod The name of the API method to invoke.
useFancyLayout bool
page int The .
resultsPerPage int Number of results in the resultset
return HyvesResponse