antenny - Python client for antenny. This is an api that allows you to interact with Antenny. It allows you to manage your clients and subscriptions. This SDK is automatically generated by the OpenAPI Generator project.
Python 2.7 and 3.4+
If the python package is hosted on a repository, you can install directly using:
pip install antenny-py
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import antenny
from antenny.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = antenny.Configuration(
host = "https://api.antenny.io",
api_key = {
'ApiKeyAuth': 'YOUR_API_KEY'
}
)
# Enter a context with an instance of the API client
with antenny.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = antenny.SubscriptionApi(api_client)
new_subscription = antenny.NewSubscription(
name = 'test-subscription',
customer_id = 'customerId',
region = 'aws-region',
resource = antenny.Resource(
protocol = 'ws',
url = 'wss://example.com'
),
endpoint = antenny.Endpoint(
protocol = 'http',
url = 'http://example.com'
)
)
try:
# Creates a subscription
api_response = api_instance.create_subscription(new_subscription)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->create_subscription: %s\n" % e)
All URIs are relative to https://api.antenny.io
Class | Method | HTTP request | Description |
---|---|---|---|
ClientApi | create_client | POST /clients | Creates a client |
ClientApi | delete_client | DELETE /clients/{clientId} | Deletes a client |
ClientApi | get_client | GET /clients/{clientId} | Gets a client |
ClientApi | list_clients | GET /customers/{custId}/clients | Gets a list of clients |
EventsApi | list_events | GET /subscriptions/{subId}/events | Gets a list of events for a subscription |
RegistrationApi | get_registration | GET /customers/{custId}/registration | Gets a customers registration |
SubscriptionApi | cancel_subscription | PATCH /subscriptions/{subId} | Cancels a subscription |
SubscriptionApi | create_subscription | POST /subscriptions | Creates a subscription |
SubscriptionApi | get_subscription | GET /subscriptions/{subId} | Gets a subscription |
SubscriptionApi | list_subscriptions | GET /customers/{custId}/subscriptions | Gets a list of subscriptions |
- Client
- ClientList
- Endpoint
- Event
- EventList
- InlineObject
- NewClient
- NewSubscription
- Registration
- Resource
- Subscription
- SubscriptionList
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header