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
dataservice = build(serviceName="data-services", version="v1", base_url='INSERT_URL_FOR_API')
api_response = dataservice.helloWorld().list()
dataservice.docs().swagger().content
dataservice.docs().redocs().content
dataservice.docs().openapi()
api_response = dataservice.alerts().requests().list()
api_response = dataservice.alerts().requests().list(creator_email='user@acme.com')
api_response = dataservice.alerts().requests().insert(new_alert_request_json)
api_response = dataservice.alerts().requests().delete(brand=brand, alert_request_id=alert_request_id)
api_response = dataservice.alerts().reports().list()
api_response = dataservice.alerts().reports().list(creator_email='user@acme.com')
api_response = dataservice.machines().utilData().list(brand=brand, time_period='today')
api_response = dataservice.machines().utilData().stats().list()
api_response = dataservice.dealers().list()
api_response = dataservice.customers().list(dealer_name=dealer_name)
api_response = dataservice.accounts().list()
api_response = dataservice.accounts().list(account="c123")
api_response = dataservice.accounts().list(account_association_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.accounts().insert(new_account=new_account)
api_response = dataservice.accounts().update(account=update_account)
api_response = dataservice.accounts().delete(account="d123")
api_response = dataservice.accounts().set_is_dealer(account="d123", is_dealer=True)
api_response = dataservice.accounts().assign_dealer(customer_account="c123", dealer_account="d123", is_default_dealer=True, dealer_internal_account="abc")
api_response = dataservice.accounts().assign_dealer(customer_account="c123", dealer_account="d123")
api_response = dataservice.accounts().unassign_dealer(customer_account="c123", dealer_account="d123")
api_response = dataservice.accounts().contacts().list(account=account)
api_response = dataservice.accounts().contacts().list(account=account, include_dealer_contacts=True)
api_response = dataservice.accounts().contacts().list(account_uid=account_uid)
api_response = dataservice.accounts().contacts().list(account_contact_uid=account_contact_uid)
api_response = dataservice.accounts().contacts().insert(new_account_contact=new_account_contact)
api_response = dataservice.accounts().contacts().update(account_contact=account_contact)
api_response = dataservice.accounts().contacts().delete(account_contact_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.accounts().customers().list()
api_response = dataservice.accounts().customers().list(dealer_account="D123")
api_response = dataservice.accounts().customers().dealer_provided_information().list(dealer_account=dealer_account, customer_account=customer_account)
api_response = dataservice.accounts().customers().dealer_provided_information().update(dealer_provided_information=dealer_provided_information)
api_response = dataservice.accounts().dealers().list()
api_response = dataservice.accounts().dealers().list(customer_account="A123")
api_response = dataservice.apbs().list()
api_response = dataservice.apbs().list(apb_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.apbs().list(brand="brand", model="model", serial="1234")
api_response = dataservice.apbs().insert(new_apb=new_apb)
api_response = dataservice.apbs().delete(apb_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.apbs().update(apb=updated_apb)
api_response = dataservice.apbs().status().list(apb_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.apbs().status().insert(new_apb_status=new_apb_status)
api_response = dataservice.apbs().status().delete(apb_status_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.apbs().status().update(apb_status=updated_apb_status)
api_response = dataservice.machines().catalog().list()
api_response = dataservice.machines().catalog().list(machine_catalog_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.machines().catalog().insert(new_machine_catalog=new_machine_catalog)
api_response = dataservice.machines().catalog().delete(machine_catalog_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.machines().catalog().update(machine_catalog=machine_catalog)
api_response = dataservice.machines().assign_machines_to_default_dealer(customer_account="c123", ignore_machines_with_dealer=True)
api_response = dataservice.machines().list()
api_response = dataservice.machines().list(account="a123")
api_response = dataservice.machines().list(account_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.machines().list(account="a123", dealer_account="d123")
api_response = dataservice.machines().list(account_uid="123e4567-e89b-12d3-a456-426614174000", dealer_account_uid="07cc67f4-45d6-494b-adac-09b5cbc7e2b5")
api_response = dataservice.machines().list(brand="brand", model="model", serial="1234")
api_response = dataservice.machines().insert(new_machine=new_machine)
api_response = dataservice.machines().delete(machine_uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.machines().update(machine=updated_machine)
api_response = dataservice.parts().list()
api_response = dataservice.parts().list(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.parts().list(partName="abc")
api_response = dataservice.parts().list(partNumber="acme-01")
api_response = dataservice.parts().list(isKit=True)
api_response = dataservice.parts().list(isKitPart=True)
api_response = dataservice.parts().list(isKit=True, isKitPart=False)
api_response = dataservice.parts().insert(part=part)
api_response = dataservice.parts().update(part=part)
api_response = dataservice.parts().delete(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.parts().kits().list(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.parts().kits().list(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.parts().kits().list(kitPartNumber="acme-01")
api_response = dataservice.parts().kits().list(partNumber="acme-01")
api_response = dataservice.parts().kits().insert(kit=kit)
api_response = dataservice.parts().kits().update(kit=kit)
api_response = dataservice.parts().kits().delete(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.services().maintenanceIntervals().list()
api_response = dataservice.services().maintenanceIntervals().list(uid="123e4567-e89b-12d3-a456-426614174000")
api_response = dataservice.services().maintenanceIntervals().list(hours=250, brand=brand, model=model)
api_response = dataservice.services().maintenanceIntervals().insert(maintenanceInterval=maintenanceInterval)
api_response = dataservice.services().maintenanceIntervals().update(maintenanceInterval=maintenanceInterval)
api_response = dataservice.services().maintenanceIntervals().delete(uid="123e4567-e89b-12d3-a456-426614174000")
Usage Examples - Email Services:
from rockyroad.rockyroad import build
emailservice = 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 = emailservice.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
Close
Hashes for RockyRoad-0.0.32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ee0ef3a4bb08ed9df4917111dd65ad7de052f5632700109c115eabe5139539 |
|
MD5 | 3f0eb962a9f3939cb99766f07672f128 |
|
BLAKE2b-256 | aa3a7dea25b3f87723675da4241e3543eafbd11cf6f84818a7318280eefb03a5 |