C# Класс ExtApi.Engine.ApiRunner

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

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

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

Защищенные методы

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

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

BuildGetUrl() защищенный Метод

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

ConvertRequestMethod() защищенный Метод

protected ConvertRequestMethod ( RequestMethod method ) : Method
method RequestMethod
Результат Method

CreateExtApiCallResult() защищенный Метод

protected CreateExtApiCallResult ( RestResponse response ) : ExtApi.Engine.Data.ExtApiCallResult
response RestSharp.RestResponse
Результат ExtApi.Engine.Data.ExtApiCallResult

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

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
Результат ExtApi.Engine.Data.ExtApiCallResult

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

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
Результат ExtApi.Engine.Data.ExtApiCallResult

HandleWebException() защищенный Метод

protected HandleWebException ( WebException ex ) : ExtApi.Engine.Data.ExtApiCallResult
ex System.Net.WebException
Результат ExtApi.Engine.Data.ExtApiCallResult