C# Class ExtApi.Engine.ApiRunner

Afficher le fichier Open project: KallDrexx/ExtApi Class Usage Examples

Méthodes publiques

Méthode Description
ExecuteApiCall ( string apiUrl, IList parameters, RequestMethod method, string username = "", string password = "" ) : ExtApi.Engine.Data.ExtApiCallResult

Performs an api call on the specified URL

ExecuteOAuthApiCall ( string apiUrl, IList parameters, RequestMethod method, string consumerKey, string consumerSecret, string accessToken, string tokenSecret ) : ExtApi.Engine.Data.ExtApiCallResult

Performs an OAuthed api call with the specified access token

Méthodes protégées

Méthode Description
BuildGetUrl ( string apiUrl, IList parameters ) : string

Builds a GET URL based on the specified api URL and the passed in parameters

ConvertRequestMethod ( RequestMethod method ) : Method
CreateExtApiCallResult ( RestResponse response ) : ExtApi.Engine.Data.ExtApiCallResult
HandleWebException ( WebException ex ) : ExtApi.Engine.Data.ExtApiCallResult

Method Details

BuildGetUrl() protected méthode

Builds a GET URL based on the specified api URL and the passed in parameters
protected BuildGetUrl ( string apiUrl, IList parameters ) : string
apiUrl string
parameters IList
Résultat string

ConvertRequestMethod() protected méthode

protected ConvertRequestMethod ( RequestMethod method ) : Method
method RequestMethod
Résultat Method

CreateExtApiCallResult() protected méthode

protected CreateExtApiCallResult ( RestResponse response ) : ExtApi.Engine.Data.ExtApiCallResult
response RestSharp.RestResponse
Résultat ExtApi.Engine.Data.ExtApiCallResult

ExecuteApiCall() public méthode

Performs an api call on the specified URL
public ExecuteApiCall ( string apiUrl, IList parameters, RequestMethod method, string username = "", string password = "" ) : ExtApi.Engine.Data.ExtApiCallResult
apiUrl string
parameters IList
method RequestMethod
username string
password string
Résultat ExtApi.Engine.Data.ExtApiCallResult

ExecuteOAuthApiCall() public méthode

Performs an OAuthed api call with the specified access token
Thrown when no token manager has been specified
public ExecuteOAuthApiCall ( string apiUrl, IList parameters, RequestMethod method, string consumerKey, string consumerSecret, string accessToken, string tokenSecret ) : ExtApi.Engine.Data.ExtApiCallResult
apiUrl string
parameters IList
method RequestMethod
consumerKey string
consumerSecret string
accessToken string
tokenSecret string
Résultat ExtApi.Engine.Data.ExtApiCallResult

HandleWebException() protected méthode

protected HandleWebException ( WebException ex ) : ExtApi.Engine.Data.ExtApiCallResult
ex System.Net.WebException
Résultat ExtApi.Engine.Data.ExtApiCallResult