live4tv_stream_networks_api_javascript

1.0.0 • Public • Published

live4tv_stream_networks_api_javascript

Live4tvStreamNetworksApiJavascript - JavaScript client for live4tv_stream_networks_api_javascript Omnichannel for live streaming on social networks We're glad that you chose to use Live4.tv's API for managing your connection with social networks (currently Instagram).

We understand that Instagram currently restricts users from conducting live broadcasts without their official app.
However, our innovative API empowers users to go live on Instagram without relying on the app itself.
By leveraging our API, users gain access to a stream key, enabling them to seamlessly transmit their live broadcasts using popular software like OBS (Open Broadcaster Software).
This breakthrough feature provides users with the freedom to connect with their audience and share captivating live content on Instagram, all without the constraints of the official app.

The login flow:

![login flow image](https://api-stream-network.live4.tv/mermaid-diagram-login-flow.png "Login flow image")

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.live4.tv/contato

Installation

For Node.js

npm

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

Then install it via:

npm install live4tv_stream_networks_api_javascript --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 live4tv_stream_networks_api_javascript 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/Live4TV/stream-network-api-client-javascript-sdk then install it via:

    npm install Live4TV/stream-network-api-client-javascript-sdk --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 Live4tvStreamNetworksApiJavascript = require('live4tv_stream_networks_api_javascript');


var api = new Live4tvStreamNetworksApiJavascript.AccountsApi()
var xApiKey = "xApiKey_example"; // {String} 
var userExternalId = john.doe@gmail.com; // {String} The user's unique identifier on your system. The same of you use to authorise-url endpoint.
var uuid = 21d6ac22-cf0c-42d2-8aa9-95e71ec32c2b; // {String} The reference to the new account that you can use to identify the account. The same of you use to authorise-url endpoint
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.socialNetworkAccountControllerGetAccount(xApiKey, userExternalId, uuid, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
Live4tvStreamNetworksApiJavascript.AccountsApi socialNetworkAccountControllerGetAccount GET /api/v1/social-network-account/{userExternalId}/{uuid} Get social account information logged from user account
Live4tvStreamNetworksApiJavascript.AccountsApi socialNetworkAccountControllerGetAuthoriseUrl POST /api/v1/social-network-account/{network}/authorise-url Add a new social network account (e.g instagram account)
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerGetComments GET /api/v1/live-streams/{uuid}/comments Get a list of comments (call it every minute)
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerMuteComment POST /api/v1/live-streams/{uuid}/comments/mute Mute comments to the live stream
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerPostComment POST /api/v1/live-streams/{uuid}/comments Post a comment into the live stream (all accounts)
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerStartListening POST /api/v1/live-streams/{uuid}/comments/start-listening Start listening comments of the live stream
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerStopListening POST /api/v1/live-streams/{uuid}/comments/stop-listening Stop listening comments of the live stream
Live4tvStreamNetworksApiJavascript.CommentsApi commentsControllerUnmuteComment POST /api/v1/live-streams/{uuid}/comments/unmute Unmute comments to the live stream
Live4tvStreamNetworksApiJavascript.LiveStreamsApi liveStreamsControllerCreateAndStartLive POST /api/v1/live-streams/{uuid}/create-and-start Start a live stream, return the stream key
Live4tvStreamNetworksApiJavascript.LiveStreamsApi liveStreamsControllerStopLive POST /api/v1/live-streams/{uuid}/stop Stop a live stream
Live4tvStreamNetworksApiJavascript.SocialNetworksApi socialNetworkControllerGetAllActive GET /api/v1/social-networks Get all social network integrations available

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

/live4tv_stream_networks_api_javascript/

    Package Sidebar

    Install

    npm i live4tv_stream_networks_api_javascript

    Weekly Downloads

    1

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    464 kB

    Total Files

    34

    Last publish

    Collaborators

    • live4tv