Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwplayer/jwplatform-node
:green_square: Node.js library for the JW Platform API
https://github.com/jwplayer/jwplatform-node
jwplatform jwplayer nodejs
Last synced: about 2 months ago
JSON representation
:green_square: Node.js library for the JW Platform API
- Host: GitHub
- URL: https://github.com/jwplayer/jwplatform-node
- Owner: jwplayer
- License: apache-2.0
- Created: 2019-10-27T15:41:54.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T01:51:34.000Z (over 1 year ago)
- Last Synced: 2024-04-26T01:21:41.662Z (8 months ago)
- Topics: jwplatform, jwplayer, nodejs
- Language: JavaScript
- Homepage: https://developer.jwplayer.com/jw-platform/
- Size: 1.54 MB
- Stars: 30
- Watchers: 7
- Forks: 13
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JW Platform API
Node client for interfacing with the JW Platform management API.
Note that this is not developed for client side use, as it requires your API Key and Secret. For your own security, please restrict usage to server side applications.
## Install
Install the package with:
```bash
yarn add jwplatform
```## Example Usage
```node
const JWPlatformAPI = require('jwplatform');const jwApi = new JWPlatformAPI({ apiKey: 'INSERT API KEY', apiSecret: 'INSERT API SECRET'});
jwApi.videos.show({ video_key: 'INSERT VIDEO KEY' }).then((response) => {
// handle response data
});
```### Upload
The JWPlatform library contains a single method for using the `single` upload method.
```node
const JWPlatformAPI = require('jwplatform');const jwApi = new JWPlatformAPI({ apiKey: 'INSERT API KEY', apiSecret: 'INSERT API SECRET'});
jwApi.upload({ videoOptions }, '/path/to/file')
```## Demo
To run a demo of this client, run the following command:
```bash
API_KEY='INSERT API KEY' \
API_SECRET='INSERT API SECRET' \
// Different routes will need different ID's. Refer to documentation for required fields.
VIDEO_KEY='INSERT VIDEO ID' \
// i.e. videos/list or videos/conversions/list
DEMO = '{RESOURCE}/{ACTION}'
make demo
```**Note that only LIST and SHOW actions are available.**
## Supported Operations
All API methods documentated on the API are available in this client. Please refer [here](https://developer.jwplayer.com/jwplayer/reference).
## Testing
The JW Platform client is tested using `chai` and `mocha`. To run the test suite, run the command `yarn test`.
Coverage reports are available through [Istanbul.js](https://istanbul.js.org/), and can be accessed by running `yarn coverage`.
## Linting
This repository is lintned using ESLint and Prettier. Two commands are available for linting:
- `yarn lint`: lints projects, without fixing any issues
- `yarn lint --fix`: runs and fixes lint issues## License
This code is provided under the Apache 2.0 License.