Class ApiQueryBuilder
Implements
Inherited Members
Namespace: LemonEdge.ApiConnector
Assembly: LemonEdge.ApiConnector.dll
Syntax
public class ApiQueryBuilder : IApiQueryBuilder
Constructors
ApiQueryBuilder()
Declaration
public ApiQueryBuilder()
Methods
BuildQuery(string, List<ApiParameter>, HttpMethod)
Creates an ApiQuery model providing a valid System.Uri and ApiQueryRequestType.
Replaces all tokens within the rawQueryUrl
with the associated ApiParameter
supplied by parameters
Declaration
public ApiQuery BuildQuery(string rawQueryUrl, List<ApiParameter> parameters, HttpMethod requestType)
Parameters
Type | Name | Description |
---|---|---|
string | rawQueryUrl | The raw tokenized raw query url. Tokens are supplied by surrounding a parameter name with curly braces. I.e. https://www.someapi.com/parameter={myParameter} |
List<ApiParameter> | parameters | A collection of ApiParameter |
HttpMethod | requestType |
Returns
Type | Description |
---|---|
ApiQuery | An ApiQuery model |
Exceptions
Type | Condition |
---|---|
Exception | Thrown when the |
NullReferenceException | Thrown when an ApiParameter key is null |
NullReferenceException | Thrown when an ApiParameter value is null |
Exception | Thrown when a given ApiParameter is not found within the |