upvest v0.1.1 Upvest.Client View Source
A module for composing authentication and request parameters to the Upvest API.
Currently encompasses key authentication and OAuth authenticationrequired for Tenancy and CLientele APIs respetively. Generally intended to passed in as parameter to Upvest.request/4.
It's implemented such that you can change the authentication parameter and retain the other configs for requests to other APIs. At a minimum, the authentication config must be present
The default BASE_URL
for both authentication objects is https://api.playground.upvest.co
,
but feel free to adjust it, in addition to additional parameters such as extra HTTP headers
and http timeout on the client struct.
Link to this section Summary
Functions
Returns a new client
Returns a new client with the given authentication
Returns a new client with the given authentication and base url
Link to this section Types
auth()
View Sourceauth() :: Upvest.Authentication.KeyAuth.t() | Upvest.Authentication.OAuth.t()
t()
View Sourcet() :: %Upvest.Client{ auth: auth() | nil, base_url: binary(), headers: map(), timeout: non_neg_integer() }
Link to this section Functions
build_url(client, path)
View Sourcebuild_url(Upvest.Client.t(), binary()) :: binary()
Returns a new client
Returns a new client with the given authentication
Returns a new client with the given authentication and base url