glusto.restable module¶
All things REST API related.
Note
Restable is inherited by the Glusto class and not designed to be instantiated.
-
class
glusto.restable.
Restable
¶ Bases:
object
The class providing REST API functionality.
-
classmethod
rest_get
(url)¶ Submit a REST API GET request.
Parameters: url (str) – The HTTP protocol standard url for the request. Returns: The HTTP protocol standard return code. Zero on success. response output (str): The output text from the response. response error (str): The error text on failure. Return type: returncode (int)
-
classmethod
rest_post
(url, data)¶ Submit a REST API POST request.
Parameters: - url (str) – The HTTP protocol standard url for the request.
- data (dict) – A dictionary of key:value pairs
Returns: The HTTP protocol standard return code. Zero on success. response output (str): The output text from the response. response error (str): The error text on failure.
Return type: returncode (int)
-
classmethod
rest_put
(url, data)¶ Submit a REST API PUT request.
Parameters: - url (str) – The HTTP protocol standard url for the request.
- data (dict) – A dictionary of key:value pairs
Returns: The HTTP protocol standard return code. Zero on success. response output (str): The output text from the response. response error (str): The error text on failure.
Return type: returncode (int)
-
classmethod
rest_delete
(url, data)¶ Submit a REST API DELETE request.
Parameters: - url (str) – The HTTP protocol standard url for the request.
- data (dict) – A dictionary of key:value pairs
Returns: The HTTP protocol standard return code. Zero on success. response output (str): The output text from the response. response error (str): The error text on failure.
Return type: returncode (int)
-
classmethod