antenny-js

Api client for antenny

Usage no npm install needed!

<script type="module">
  import antennyJs from 'https://cdn.skypack.dev/antenny-js';
</script>

README

antenny-js

antenny - JavaScript 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.

Installation

For Node.js

npm

npm install antenny-js --save

Getting Started

Please follow the installation instructions and execute the following JS code:

const antenny = require('antenny-js');
const instance = antenny.ApiClient.instance;
const Auth = instance.authentications['ApiKeyAuth'];
Auth.apiKey = "YOUR API KEY"

// create subscription
const api = new antenny.SubscriptionApi();
const newSub = new antenny.NewSubscription({
  name: 'test-subscription',
  customerId: '{customerId}',
  region: '{aws-region}',
  resource: new antenny.Resource({
    protocol: 'ws',
    url: 'wss://example.com/'
  }),
  endpoint: new antenny.Endpoint({
    protocol: 'http',
    url: 'https://example.com'
  })
});

let sub;
try {
  sub = await api.createSubscription(newSub);
} catch (err) {
  console.error(err);
  return;
}
console.log(sub);

Documentation for API Endpoints

All URIs are relative to https://api.antenny.io

Class Method HTTP request Description
antenny.ClientApi createClient POST /clients Creates a client
antenny.ClientApi deleteClient DELETE /clients/{clientId} Deletes a client
antenny.ClientApi getClient GET /clients/{clientId} Gets a client
antenny.ClientApi listClients GET /customers/{custId}/clients Gets a list of clients
antenny.EventsApi listEvents GET /subscriptions/{subId}/events Gets a list of events for a subscription
antenny.RegistrationApi getRegistration GET /customers/{custId}/registration Gets a customers registration
antenny.SubscriptionApi cancelSubscription PATCH /subscriptions/{subId} Cancels a subscription
antenny.SubscriptionApi createSubscription POST /subscriptions Creates a subscription
antenny.SubscriptionApi getSubscription GET /subscriptions/{subId} Gets a subscription
antenny.SubscriptionApi listSubscriptions GET /customers/{custId}/subscriptions Gets a list of subscriptions

Documentation for Models

Documentation for Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header