Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/inplayer-org/inplayer.js

InPlayer JS SDK
https://github.com/inplayer-org/inplayer.js

hacktoberfest hacktoberfest2020

Last synced: about 1 month ago
JSON representation

InPlayer JS SDK

Awesome Lists containing this project

README

        



inplayer-js


InPlayer JavaScript SDK


InPlayer's JS API client wrapper

[![npm version](https://img.shields.io/npm/v/@inplayer-org/inplayer.js.svg)](https://www.npmjs.com/package/@inplayer-org/inplayer.js)
![CI](https://github.com/inplayer-org/inplayer.js/workflows/CI/badge.svg)
[![Netlify Status](https://api.netlify.com/api/v1/badges/a6f99b76-a75a-48d4-ab3e-d0ad387cbc41/deploy-status)](https://app.netlify.com/sites/inplayer-js/deploys)

[inplayer.com](https://inplayer.com)

SDK Documentation can be found:

- [v2](https://inplayer-org.github.io/inplayer.js/)
- [v3](https://inplayer-js.netlify.app/)

## Examples

- [HTML](https://github.com/inplayer-org/inplayer.js/blob/v3/examples/v3.html)
- [React](https://codesandbox.io/s/inplayer-react-js-sdk-yf956?file=/src/App.js)
- [React-Native](https://codesandbox.io/s/inplayer-react-native-js-sdk-bvhwz?file=/src/App.js)

## Installation

Install the package from [npm](https://www.npmjs.com/package/@inplayer-org/inplayer.js) and import it in your project.

```bash
npm install --save @inplayer-org/inplayer.js
```

Alternatively you can include the script like so:

### Latest v2 version

```

```

### Latest v3 version

```

```

### Sign in using grant type: password

```
InPlayer.Account.signIn({
email: '[email protected]',
password: '12345678',
clientId: 'b0899d7f-66da-40fc-8eeb-36cad735589c',
referrer: 'http://localhost:3000/'
}).then(data => console.log(data));
```

### Sign in using grant type: refresh token

```
InPlayer.Account.signIn({
clientId: 'b0899d7f-66da-40fc-8eeb-36cad735589c',
refreshToken: '528b1b80-ddd1hj-4abc-gha3j-111111',
referrer: 'http://localhost:3000/'
}).then(data => console.log(data));
```

### Sign in using grant type: client secret

```
InPlayer.Account.signIn({
clientId: 'b0899d7f-66da-40fc-8eeb-36cad735589c',
clientSecret: '528b1b80-ddd1hj-4abc-gha3j-111111',
referrer: 'http://localhost:3000/'
}).then(data => console.log(data));
```

## Contributing

We love community contributions, so here's a quick guide if you want to help out:

1. Fork the repository
2. Write your changes
3. Make sure the tests pass
4. Update the docs
5. Commit your changes
6. Send us a PR