Socket
Socket
Sign inDemoInstall

brightcove-axios

Package Overview
Dependencies
5
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    brightcove-axios

An axios wrapper for [Brightcove APIs](https://support.brightcove.com/getting-started-platform-apis)


Version published
Maintainers
1
Install size
382 kB
Created

Readme

Source

Brightcove axios

An axios wrapper for Brightcove APIs

Installing

$ npm install brightcove-axios

Usage

const { cmsApi } = require('brightcove-axios');

const bcRequestConfig = {
    clientId: 'aaaaa-bbbbb-ccccc-dddd-eeeeee',
    clientSecret: 'EXuoOigTEXfpd4iCJaaaFWKPreWjojtX7kQwG4Ne8QuBACaS37Hu0v8TpqEmYtLBLloSnegqtWJbC7dFj9RaHw',
};
const accountId = '5132399229001';

cmsApi.get(`/accounts/${accountId}/videos`, bcRequestConfig)
    .then(response => console.log('CMS API response', response))
    .catch(err => console.error('CMS API err', err));

Available APIs

CMS API

const { cmsApi } = require('brightcove-axios');

const bcRequestConfig = {
    clientId: 'aaaaa-bbbbb-ccccc-dddd-eeeeee',
    clientSecret: 'EXuoOigTEXfpd4iCJaaaFWKPreWjojtX7kQwG4Ne8QuBACaS37Hu0v8TpqEmYtLBLloSnegqtWJbC7dFj9RaHw',
};
const accountId = '5132399229001';

cmsApi.get(`/accounts/${accountId}/videos`, bcRequestConfig)
    .then(response => console.log('CMS API response', response))
    .catch(err => console.error('CMS API err', err));

Dynamic Ingest API

const { dynamicIngestApi } = require('brightcove-axios');

const bcRequestConfig = {
    clientId: 'aaaaa-bbbbb-ccccc-dddd-eeeeee',
    clientSecret: 'EXuoOigTEXfpd4iCJaaaFWKPreWjojtX7kQwG4Ne8QuBACaS37Hu0v8TpqEmYtLBLloSnegqtWJbC7dFj9RaHw',
};
const accountId = '5132399229001';
const postData = {
    master: {
        url: "http://learning-services-media.brightcove.com/videos/mp4/greatblueheron.mp4",
        audio_tracks: [
            { language: "en", variant: "main" },
        ]
    },
};

dynamicIngestApi.post(`/accounts/${accountId}/videos/${videoId}/ingest-requests`, postData, bcRequestConfig)
    .then(response => console.log('Dynamic Ingest API response', response))
    .catch(err => console.error('Dynamic Ingest API err', err));

FAQs

Last updated on 23 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc