Skip to main content

Python API Client

Project description

api-client-python

Installation

pip install resellerinterface-api-client-python

Example

from resellerinterface_api_client_python import Client

# create a new client
client = Client()

# login
await client.login("username", "password", 1234)

# make a request
response = await client.request("reseller/details", {"resellerID": "own"})
print(response.getData())
# response
# {
#     "time": 12,
#     "state": 1000,
#     "stateName": "OK",
#     "stateParam": "",
#     "reseller": {
#     "resellerID": 23456,
#         "parentID": 23455,
#         "state": "ACTIVE",
#         "company": "Acme Corp.",
#         "firstname": "John",
#         "lastname": "Doe",
#         "street": "Mainstreet",
#         "number": "1223",
#         "postcode": "10115",
#         "city": "Berlin",
#         "country": "DE",
#         "mail": "info@example.org",
#         "phone": "+491234567890",
#         "fax": "",
#         "parents": [
#         23455
#     ],
#         "settings": {
#         "group": {
#             "name": "value"
#         }
#     }
# },
#     "user": {
#     "userID": 12345,
#         "state": "ACTIVE",
#         "username": "User",
#         "password": "****",
#         "settings": {
#         "group": {
#             "name": "value"
#         }
#     },
#     "rightsCategory": 51,
#         "rightsGroups": [
#         912,
#         913
#     ],
#         "directRights": {
#         "category": {
#             "group": {
#                 "function": true
#             }
#         }
#     },
#     "rights": {
#         "category": {
#             "group": {
#                 "function": true
#             }
#         }
#     }
# }
# }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

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