# jwplayer-sdk

> A library wrapper around JW Player API

Latest version **1.0.0** (published 2019-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install jwplayer-sdk
pnpm add jwplayer-sdk
yarn add jwplayer-sdk
bun add jwplayer-sdk
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-01-06 |
| First published | 2018-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 55.5 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Faustino Kialungila |
| Maintainers | fausto95 |

## Links

- npm: https://www.npmjs.com/package/jwplayer-sdk
- Repository: https://github.com/Fausto95/jw-player-api
- Homepage: https://github.com/Fausto95/jw-player-api#readme
- Issues: https://github.com/Fausto95/jw-player-api/issues
- npm.io page: https://npm.io/package/jwplayer-sdk

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.88.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^3.1.9-1
- [query-string](https://npm.io/package/query-string.md) ^6.1.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Recent versions

- 1.0.0 (latest) — 2019-01-06
- 0.2.1 — 2019-01-05
- 0.2.0 — 2019-01-04
- 0.1.0 — 2018-09-15

## README

`Examples`: https://repl.it/@Fausto95/jwplayer-sdk

`API-Reference`: https://jwplayer-sdk.netlify.com/

# 🔧 Installation
```shell
yarn add jwplayer-sdk
```
# ⚙️ Usage

```js



// ES Modules
import JWPlayer from 'jwplayer-sdk';

//initializating...
const JWAPI = new JWPlayer({
  apiKey: 'your apiKey goes here',
  secretKey: 'your secreteKey goes here',
  apiFormat: 'json'
});


const videos = await JWAPI.getAllVideos(params); // params are optional
/*
  result: [
    {
      views: 0,
      height: 400,
      cloudHostedPlayer: 'https://content.jwplatform.com/libraries/dfNGJds0.js',
      key: 'dfNGJds0',
      skin: { type: 'built-in', name: 'Default', key: 'M03UUDt9' },
      responsive: false,
      playlist: 'none',
      releaseChannel: 'production',
      name: 'My Player',
      custom: {},
      width: 400,
      version: '8',
      ltasChannel: null
    }
  ]
*/
```

### Current Available Features:

```typescript
// Player
  .getAllPlayers(params: Object) // Optional
  .getPlayer(playerKey: String) // Required
  .createPlayer(params: Object) // Required
  .updatePlayer(playerKey: String, params: Object) // Both required
  .deletePlayer(playerKey: String) // Required

// Videos
  .getAllVideos(params: Object) // Optional
  .getVideo(videoKey: String) // Required
  .uploadVideo(file: ReadableStream, params: Object) // Params is optional
  .fetchUpload(url: String, params: Object) // Url is Required
  .batchFetchUpload(content: Object) // Content is Required
  .updateVideo(videoKey: String, params: Object) // Both required
  .deleteVideo(videoKey: String) // Required

//Videos Thumbnails
  .modifyThumbnailFrame(videoKey: String, params: Object) // Both Required
  .uploadThumbnail(videoKey: String, imageFile: ReadableStream) // Both Required
````

## Contributing

You must have a JwPlayer account!
Clone the repo
```shell
git clone https://github.com/Fausto95/jw-player-api.git
```
Install the dependencies
```shell
npm install
```

Make your changes, test and send a PR

## Roadmap (API)
- [ ] /accounts
- [ ] /accounts/tags
- [ ] /accounts/usage
- [ ] /channels
- [ ] /channels/videos
- [x] /players
- [ ] /status
- [x] /videos
- [ ] /videos/converstations
- [ ] /videos/tags
- [x] /videos/thumbnails
- [ ] /videos/tracks
- [x] /fetch-upload

## License

MIT

---
_Source: https://npm.io/package/jwplayer-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
