C# Class inBloomApiLibrary.ApiClient

API Client used for executing API requests and getting the response
显示文件 Open project: upeo/inbloom-dotnet

Public Methods

Method Description
Post ( string apiEndpoint, string accessToken, string data, RequestType requestType = RequestType.JsonObject ) : ApiResponse

Executes a POST against the inBloom API

Request ( string apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : ApiResponse

Executes a request against the API and gets the result as a JSON

RequestAsync ( Uri apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : Task

Executes an asynchronous request against the API and gets the result as a JSON

RequestAsync ( string apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : Task

Executes an asynchronous request against the API and gets the result as a JSON

Private Methods

Method Description
GetApiResponse ( string response, RequestType requestType, HttpStatusCode statusCode ) : ApiResponse
GetExtendedWebClient ( string accessToken, RequestType requestType ) : ExtendedWebClient

Method Details

Post() public static method

Executes a POST against the inBloom API
public static Post ( string apiEndpoint, string accessToken, string data, RequestType requestType = RequestType.JsonObject ) : ApiResponse
apiEndpoint string
accessToken string
data string
requestType RequestType
return ApiResponse

Request() public static method

Executes a request against the API and gets the result as a JSON
public static Request ( string apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : ApiResponse
apiEndpoint string
accessToken string
requestType RequestType
return ApiResponse

RequestAsync() public static method

Executes an asynchronous request against the API and gets the result as a JSON
public static RequestAsync ( Uri apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : Task
apiEndpoint System.Uri
accessToken string
requestType RequestType
return Task

RequestAsync() public static method

Executes an asynchronous request against the API and gets the result as a JSON
public static RequestAsync ( string apiEndpoint, string accessToken, RequestType requestType = RequestType.JsonObject ) : Task
apiEndpoint string
accessToken string
requestType RequestType
return Task