reviewbot.utils.api¶
API utility functions.
New in version 3.0.
Functions
|
Return the root of the Review Board API. |
- get_api_root(url, username=None, api_token=None, session=None)[source]¶
Return the root of the Review Board API.
Either
session
or bothusername
andapi_token
must be provided.New in version 3.0.
- Parameters:
url (
str
) – The path to the Review Board server.username (
str
, optional) – The username used for authentication.api_token (
str
, optional) – The API token used for authentication.session (
str
, optional) – An existing Review Board session identifier.
- Returns:
The root API resource for the server.
- Return type:
rbtools.api.resources.RootResource
- Raises:
rbtools.api.errors.APIError – There was an error fetching the root resource.