OAuthClient¶
-
class
pysnow.oauth_client.
OAuthClient
(client_id=None, client_secret=None, token_updater=None, **kwargs)[source]¶ Pysnow
Client
with extras for oauth session and token handling.Parameters: - client_id – client_id from ServiceNow
- client_secret – client_secret from ServiceNow
- token_updater – function called when a token has been refreshed
- kwargs – kwargs passed along to
pysnow.Client
-
resource
(api_path=None, base_path='/api/now', chunk_size=None)[source]¶ Overrides
resource()
provided bypysnow.Client
with extras for OAuthParameters: - api_path – Path to the API to operate on
- base_path – (optional) Base path override
- chunk_size – Response stream parser chunk size (in bytes)
Returns: Resource
object
Raises: - InvalidUsage: If a path fails validation