Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
/ javascript-sdk Public archive

iStreamPlanet SDK for Javascript & TypeScript

Notifications You must be signed in to change notification settings

istreamlabs/javascript-sdk

Repository files navigation

isp

Isp - JavaScript client for isp This API provides a way to list, create, and run channels.

Channels consist of inputs (ingest), transcoding settings like codecs and bitrates, and outputs (publishing).

List calls use cursor-based pagination with RFC 5988 Link headers. Clients should read this header and follow the next link to read all pages of results.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.0
  • Package version: 0.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://istreamplanet.com/contact/

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install isp --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your isp from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var Isp = require('isp');

var defaultClient = Isp.ApiClient.instance;
// Configure OAuth2 access token for authorization: authcode
var authcode = defaultClient.authentications['authcode'];
authcode.accessToken = "YOUR ACCESS TOKEN"
// Configure OAuth2 access token for authorization: m2m
var m2m = defaultClient.authentications['m2m'];
m2m.accessToken = "YOUR ACCESS TOKEN"

var api = new Isp.AuditOperationsApi()
var channelId = "channelId_example"; // {String} Unique channel identifier
var opts = {
  'offset': 56 // {Number} Number of items to skip when calling a paginated API
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChannelTimeline(channelId, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://api.istreamplanet.com

Class Method HTTP request Description
Isp.AuditOperationsApi getChannelTimeline GET /v2/channels/{channel-id}/timeline Get Channel Timeline
Isp.ChannelOperationsApi clearDvrWindow DELETE /v2/channels/{channel-id}/dvr-window Clear DVR Window
Isp.ChannelOperationsApi getSignals GET /v2/channels/{channel-id}/signal Get Signals
Isp.ChannelOperationsApi insertId3 POST /v2/channels/{channel-id}/id3 Insert ID3
Isp.ChannelOperationsApi insertScte35 POST /v2/channels/{channel-id}/scte35 Insert SCTE-35
Isp.ChannelOperationsApi previewImage GET /v2/channels/{channel-id}/preview-image Get Preview Image
Isp.ChannelOperationsApi programEnd POST /v2/channels/{channel-id}/program-end Program End
Isp.ChannelOperationsApi programStart POST /v2/channels/{channel-id}/program-start Program Start
Isp.ChannelOperationsApi signal POST /v2/channels/{channel-id}/signal Generic Signal
Isp.ChannelOperationsApi slateIn POST /v2/channels/{channel-id}/slate Slate in
Isp.ChannelOperationsApi slateOut DELETE /v2/channels/{channel-id}/slate Slate out
Isp.ChannelOperationsApi spliceEnd POST /v2/channels/{channel-id}/splice-end Splice Insert End
Isp.ChannelOperationsApi spliceStart POST /v2/channels/{channel-id}/splice-start Splice Insert Start
Isp.ChannelsApi deleteChannel DELETE /v2/channels/{channel-id} Delete channel
Isp.ChannelsApi getChannel GET /v2/channels/{channel-id} Get Channel
Isp.ChannelsApi getPlaybackConfig GET /v2/channels/{channel-id}/playback Get Channel Playback Config
Isp.ChannelsApi listChannels GET /v2/channels List channels
Isp.ChannelsApi putChannel PUT /v2/channels/{channel-id} Create/Update channel
Isp.SourcesApi getSource GET /v2/sources/{source-id} Get Source
Isp.SourcesApi listSources GET /v2/sources List Sources

Documentation for Models

Documentation for Authorization

authcode

m2m

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

About

iStreamPlanet SDK for Javascript & TypeScript

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •