Skip to main content

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()

    service.docs().swagger().content
    service.docs().redocs().content
    service.docs().openapi()

    api_response = service.alerts().requests().list()
    api_response = service.alerts().requests().list(creator_email='user@acme.com')
    api_response = service.alerts().requests().insert(new_alert_request_json)
    api_response = service.alerts().requests().delete(brand=brand, alert_request_id=alert_request_id)

    api_response = service.alerts().reports().list()
    api_response = service.alerts().reports().list(creator_email='user@acme.com')

    api_response = service.machines().utilData().list(brand=brand, time_period='today')
    api_response = service.machines().utilData().stats().list()

    api_response = service.dealers().list()
    api_response = service.customers().list(dealer_name=dealer_name)

    api_response = service.accounts().list()
    api_response = service.accounts().list(account="c123")
    api_response = service.accounts().insert(new_account=new_account)
    api_response = service.accounts().update(account=update_account)
    api_response = service.accounts().delete(account="d123")

    api_response = service.accounts().set_is_dealer(account="d123", is_dealer=True)
    api_response = service.accounts().assign_dealer(customer_account="c123", dealer_account="d123")
    api_response = service.accounts().unassign_dealer(customer_account="c123", dealer_account="d123")

    api_response = dataservice.accounts().contacts().list(account=account)
    api_response = dataservice.accounts().contacts().list(account_uid=account_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 = service.accounts().customers().list()
    api_response = service.accounts().customers().list(dealer_account="D123")
    api_response = service.accounts().customers().dealer_information().list(dealer_account=dealer_account, customer_account=customer_account)
    api_response = service.accounts().customers().dealer_information().update(dealer_information=dealer_information)

    api_response = service.accounts().dealers().list()
    api_response = service.accounts().dealers().list(customer_account="A123")

    api_response = service.apbs().list()
    api_response = service.apbs().list(apb_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.apbs().list(brand="brand", model="model", serial="1234")
    api_response = service.apbs().insert(new_apb=new_apb)
    api_response = service.apbs().delete(apb_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.apbs().update(apb=updated_apb)

    api_response = service.apbs().status().list(apb_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.apbs().status().insert(new_apb_status=new_apb_status)
    api_response = service.apbs().status().delete(apb_uid=123e4567-e89b-12d3-a456-426614174000, apb_status_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.apbs().status().update(apb_status=updated_apb_status)

    api_response = service.machines().catalog().list()
    api_response = service.machines().catalog().list(machine_catalog_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.machines().catalog().insert(new_machine_catalog=new_machine_catalog)
    api_response = service.machines().catalog().delete(machine_catalog_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.machines().catalog().update(machine_catalog=machine_catalog)

    api_response = service.machines().list()
    api_response = service.machines().list(account="a123")
    api_response = service.machines().list(account_uid="123e4567-e89b-12d3-a456-426614174000")
    api_response = service.machines().list(brand="brand", model="model", serial="1234")
    api_response = service.machines().insert(new_machine=new_machine)
    api_response = service.machines().delete(machine_uid=123e4567-e89b-12d3-a456-426614174000)
    api_response = service.machines().update(machine=updated_machine)

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

RockyRoad-0.0.25-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file RockyRoad-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: RockyRoad-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for RockyRoad-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 b9142428acb7387e750c0f03ca6d5bcabf3fa35fb5d878e380cb35945ca1f878
MD5 b8086985959a918ad417d6451c6a2cfd
BLAKE2b-256 c5a6be4cd1464be7dfea208dad1ae46330d6578d73fbf7bf24d117d5319188f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page