Python wrapper for the RockyRoad API
Project description
RockyRoad
This package provides a Python wrapper for the RockyRoad API.
RockyRoad is a part of the PyPi repository and can be installed via
pip install RockyRoad
export OCP_APIM_SUBSCRIPTION_KEY="INSERT_YOUR_SUBSCRIPTION_KEY"
Usage Examples - Data Services:
from rockyroad.rockyroad import build
service = build(serviceName="data-services", version="v1", base_url='INSERT_URL_FOR_API')
api_response = service.helloWorld().list()
print(api_response)
api_response = service.alerts().requests().list()
print(api_response)
api_response = service.alerts().requests().list(creator_email='user@acme.com')
print(api_response)
api_response = service.alerts().requests().insert(new_alert_request_json)
print(api_response)
api_response = service.alerts().requests().delete(brand=brand, alert_request_id=alert_request_id)
print(api_response)
api_response = service.alerts().reports().list()
print(api_response)
api_response = service.alerts().reports().list(creator_email='user@acme.com')
print(api_response)
api_response = service.machines().utilData().list(brand=brand, time_period='today')
print(api_response)
api_response = service.machines().utilData().stats().list()
print(api_response)
api_response = service.dealers().list()
print(api_response)
api_response = service.customers().list(dealer_name=dealer_name)
print(api_response)
api_response = service.accounts().list()
print(api_response)
api_response = service.accounts().list(account="c123")
print(api_response)
api_response = service.accounts().insert(new_account=new_account)
print(api_response)
api_response = service.accounts().update(account=update_account)
print(api_response)
api_response = service.accounts().delete(account="d123")
print(api_response)
api_response = service.accounts().set_is_dealer(account="d123", is_dealer=True)
print(api_response)
api_response = service.accounts().assign_dealer(customer_account="c123", dealer_account="d123")
print(api_response)
api_response = service.accounts().unassign_dealer(
customer_account="c123", dealer_account="d123"
)
print(api_response)
api_response = service.accounts().customers().list()
print(api_response)
api_response = service.accounts().customers().list(dealer_account="D123")
print(api_response)
api_response = service.accounts().dealers().list()
print(api_response)
api_response = service.accounts().dealers().list(customer_account="A123")
print(api_response)
Usage Examples - Email Services:
from rockyroad.rockyroad import build
service = build(serviceName="email-services", version="v1", base_url='INSERT_URL_FOR_API')
email_message = {
"recipient": "someone@acme.com",
"subject": "Sending Email Message via API",
"html_message": "This email send via the API!",
"text_message": "This email send via the API!",
}
api_response = service.emails().send(email_message_json)
print(api_response)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file RockyRoad-0.0.22-py3-none-any.whl
.
File metadata
- Download URL: RockyRoad-0.0.22-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4d911d42c96292085a2a2c104675966d1c87f72faf262ece7d65efa2c664497 |
|
MD5 | 1f3ae440c339825ffdf64f8162f61d71 |
|
BLAKE2b-256 | c1fca02d04ad5bc430163c0e7d3f77af8ce1ea337eb8e72ee745a7cf388cb68e |