Skip to main content
Latest
class ServerConfiguration
import { ServerConfiguration } from "https://deno.land/x/periskope_maytapi_deno@v1.4.0/index.ts";

Represents the configuration of a server including its url template and variable configuration based on the url.

Constructors

new
ServerConfiguration(url: string, variableConfiguration: T)

Type Parameters

T extends { [key: string]: string; }

Methods

private
getUrl()
makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext

Creates a new request context for this server using the url with variables replaced with their respective values and the endpoint of the request appended.

setVariables(variableConfiguration: Partial<T>)

Sets the value of the variables of this server. Variables are included in the url of this ServerConfiguration in the form {variableName}