Session¶
-
class
moco_wrapper.models.
Session
(moco)¶ Class for handling authentication against the moco api with a users email address and password.
This model is used internally when the moco instance is created with no api key in the authentication object and will be invoked before the first request is fired.
-
authenticate
(email: str, password: str)¶ Authenticates the client with email and password.
Parameters: - email (str) – Email address
- password (str) – Password
Returns: Authentication information
Return type:
-
static
endpoints
() → List[moco_wrapper.util.endpoint.endpoint.Endpoint]¶ Returns all endpoints associated with the model
Returns: List of Endpoint objects Return type: moco_wrapper.util.endpoint.Endpoint
-
verify
()¶ Verifies that the current api key is still valid
Returns: Session verification object Return type: moco_wrapper.util.response.ObjectResponse
-