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 (unicode) – The path to the Review Board server.
username (unicode, optional) – The username used for authentication.
api_token (unicode, optional) – The API token used for authentication.
session (unicode, 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.