Skip to content

v2.2.2

Choose a tag to compare

@stevedejong stevedejong released this 14 Oct 13:29
· 31 commits to master since this release

_do_call () of the connection does not handle background tasks and ACCEPTED http response codes

New parameter added to RestAPIClient constructor: use_token: bool = False

RestApiClient(bu: str, pr: str = None, use_token: bool = False, use_http: bool =False, host: str = "api.ultradns.com")
Initialize a Rest API Client.
Arguments:
bu (str) -- Either username or bearer token based on use_token flag.
pr (str, optional) -- Either password or refresh token based on use_token flag. Defaults to None.
use_token (bool, optional) -- If True, treats bu as bearer token and pr as refresh token. Defaults to False.

Keyword Arguments:
use_http (bool, optional) -- For internal testing purposes only, lets developers use http instead of https.
host (str) -- Allows you to point to a server other than the production server.

Raises:
ValueError -- If pr is not provided when use_token is True.