1.4.3 • Published 3 years ago
brightcove-services v1.4.3
Brightcove Services
A promise based wrapper for supported Brightcove APIs.
Info
- Status: Active
- Type: Back-end Library
- Versioning: Semver
Documentation
All project documentation is in this Readme
Deployment
Use Manual Library Deployment documentation to deploy new versions of the library to Brightcove NPM Organization
Installation
$ npm install <bithub repo>
Usage
Chilmark (BAM)
The following example assumes authentication with signin.brightcove.com has been successful and the BC_TOKEN cookie is available to use.
var Chilmark = require('brightcove-settings').Chilmark;
var client = new Chilmark({ host: 'https://chilmarkhost' });
client.getUser(BC_TOKEN)
.then(function(user){
console.log(user);
})
.fail(function(error){
console.log(error);
})
SETI
The following example assumes a user object is available with an account set as current.
var SETI = require('brightcove-settings').SETI;
var client = new SETI({
host: 'https://setihost',
oauth: {
host: 'https://localhost:8443',
client: {
id: 'fake',
secret: 'fake'
},
paths : {
token: '/oauth/token'
}
}
});
client.getSettings(user.currentAccount.id, 'account')
.then(function(settings){
console.log(settings);
})
.fail(function(error){
console.log(error);
})
OAuth (Cathy)
var OAuth = require('brightcove-settings').OAuth;
var client = new OAuth({
host: 'https://localhost:8443',
client: {
id: 'fake',
secret: 'fake'
},
paths : {
token: '/oauth/token'
}
});
client.oauth.getAccessToken(account)
.then(function(result) {
console.log(result.access_token);
})
.fail(function(error){
console.log(error);
});
Test
$ npm test
Maintainers
The lead maintainers on this project are
- Application Back-end Developers - team-apps-backend@brightcove.com
Issues
This projects uses Apps Backend Jira project.
Questions
Questions or clarifications about this project can be posted to our Slack Channel: #team-apps-backend.
This is a well-documented-project. Help improve the quality of Brightcove documentation.
1.4.3
3 years ago