readycloud package¶
Submodules¶
readycloud.decorators module¶
readycloud.exceptions module¶
readycloud.readycloud module¶
readycloud.readycloud¶
Module which contains ReadyCloud class.
-
class
readycloud.readycloud.ReadyCloud(token, host='https://readycloud.com/')[source]¶ Bases:
objectClass for working with ReadyCloud API.
Parameters: - token (str) – your bearer token
- host (str) – host with which you want to work (readycloud.com by default)
-
create_order(order)[source]¶ Create a new order.
Parameters: order (dict) – dict structure of order Returns: dict – dictionary with response
-
create_orders_webhook(url)[source]¶ Create new webhook for orders.
Parameters: url (str) – Url to which RS should post updated for orders Returns: dict – dictionary with response
-
create_webhook(entity, url)[source]¶ Create new webhook.
Parameters: - entity (str) – Entity for which you want to register webhook
- url (str) – Url to which RC should post updates for registered entity
Returns: dict – dictionary with response
-
delete(*args, **kwargs)[source]¶ Do DELETE request to ReadyCloud.
Parameters: url (str) – url to which you want to do request Returns: dict – dictionary with response
-
delete_order(order_id)[source]¶ Delete order
Parameters: order_id (int) – order id for delete Returns: dict – dictionary with response
-
delete_webhook(webhook_id)[source]¶ Delete webhook
Parameters: webhook_id (int) – webhook id for delete Returns: dict – dictionary with response
-
get(*args, **kwargs)[source]¶ Do GET request to ReadyCloud.
Parameters: - url (str) – url to which you want to do request
- params (dict) – dict with request params
Returns: dict – dictionary with response
-
get_order_url(order_id)[source]¶ Get orders endpoint url for specified order_id
Parameters: order_id (int) – order id Returns: str – absolute url to order endpoint
-
get_orders(**kwargs)[source]¶ Get orders.
Parameters: **kwargs – filters, limit, offset, etc.
Returns: dict – dictionary with response
-
get_webhook_url(webhook_id)[source]¶ Get webhoojs endpoint url for specified webhook_id
Parameters: webhook_id (int) – webhook id Returns: str – absolute url to webhook endpoint
-
get_webhooks(**kwargs)[source]¶ Get list of registered webhooks
Returns: dict – dictionary with response
-
get_webhooks_url()[source]¶ Get webhooks endpoint url.
Returns: str – absolute url to webhooks endpoint
-
post(*args, **kwargs)[source]¶ Do POST request to ReadyCloud.
Parameters: - url (str) – url to which you want to do request
- data (dict) – dict with POST data
Returns: dict – dictionary with response
-
put(*args, **kwargs)[source]¶ Do PUT request to ReadyCloud.
Parameters: - url (str) – url to which you want to do request
- data (dict) – dict with data which you want to PUT
Returns: dict – dictionary with response
-
update_order(order_id, order)[source]¶ Update an existing order.
Parameters: - order_id (int) – order id
- order (dict) – dict structure of order
Returns: dict – dictionary with response
readycloud.utils module¶
readycloud.utils¶
Module which contains different utils, helpers, etc.