1.3.0 • Published 3 years ago

antenny-js v1.3.0

Weekly downloads
1
License
Apache 2.0
Repository
-
Last release
3 years ago

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

ClassMethodHTTP requestDescription
antenny.ClientApicreateClientPOST /clientsCreates a client
antenny.ClientApideleteClientDELETE /clients/{clientId}Deletes a client
antenny.ClientApigetClientGET /clients/{clientId}Gets a client
antenny.ClientApilistClientsGET /customers/{custId}/clientsGets a list of clients
antenny.EventsApilistEventsGET /subscriptions/{subId}/eventsGets a list of events for a subscription
antenny.RegistrationApigetRegistrationGET /customers/{custId}/registrationGets a customers registration
antenny.SubscriptionApicancelSubscriptionPATCH /subscriptions/{subId}Cancels a subscription
antenny.SubscriptionApicreateSubscriptionPOST /subscriptionsCreates a subscription
antenny.SubscriptionApigetSubscriptionGET /subscriptions/{subId}Gets a subscription
antenny.SubscriptionApilistSubscriptionsGET /customers/{custId}/subscriptionsGets a list of subscriptions

Documentation for Models

Documentation for Authorization

ApiKeyAuth

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

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago