C# Класс BridgeStack.ApiEndpointBuilder

Tasked with building endpoint URI strings to the different methods exposed by the API.
Наследование: IApiEndpointBuilder
Показать файл Открыть проект

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

Метод Описание
ApiEndpointBuilder ( IStackClient client, ApiMethodEnum method, string appKey = null, string accessToken = null ) : System

Instances the ApiEndpointBuilder. appKey and accessToken aren't actually required parameters.

Params ( IQuery parameters ) : IApiEndpointBuilder

Assigns Query fluently.

ToString ( ) : string

Overrides the default ToString method call with a method call that actually builds the endpoint.

Vectorized ( ICollection vectors ) : IApiEndpointBuilder

Assigns Vectors fluently.

Приватные методы

Метод Описание
ApiEndpointBuilder ( ) : System

Instances the ApiEndpointBuilder without setting any of the required parameters.

Build ( ) : string

Builds and returns the target endpoint Uri.

BuildParameters ( ) : string

Builds query string parameters, optionally appends authentication parameters.

GetAuthenticationParameters ( ) : string

Appends the application key and access token to the query string parameters. Both of these parameters are optional to the ApiEndpointBuilder.

GetQueryStringParameters ( ) : string

Through reflection, lists the query string parameters, verifies they are conform to constraint attributes, and returns the deserialized version of them.

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

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

Instances the ApiEndpointBuilder. appKey and accessToken aren't actually required parameters.
public ApiEndpointBuilder ( IStackClient client, ApiMethodEnum method, string appKey = null, string accessToken = null ) : System
client IStackClient The Stack Exchange client that owns this API endpoint builder.
method ApiMethodEnum The API method to target.
appKey string The application's key. Grants a higher request quota.
accessToken string The user's access token. Grants authentication and access to methods which require that the application be acting on behalf of a user in order to be invoked.
Результат System

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

Assigns Query fluently.
public Params ( IQuery parameters ) : IApiEndpointBuilder
parameters IQuery The value.
Результат IApiEndpointBuilder

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

Overrides the default ToString method call with a method call that actually builds the endpoint.
public ToString ( ) : string
Результат string

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

Assigns Vectors fluently.
public Vectorized ( ICollection vectors ) : IApiEndpointBuilder
vectors ICollection The value.
Результат IApiEndpointBuilder