@inplayer-org/inplayer.js
v3.13.28
Published
A Javascript SDK for Inplayer's RESTful API
Downloads
5,554
Readme
SDK Documentation can be found:
Examples
Installation
Install the package from npm and import it in your project.
npm install --save @inplayer-org/inplayer.js
Alternatively you can include the script like so:
Latest v2 version
<script src="https://unpkg.com/@inplayer-org/inplayer.js@v2/dist/inplayer.umd.js"></script>
Latest v3 version
<script src="https://unpkg.com/@inplayer-org/inplayer.js@v3/dist/inplayer.min.js"></script>
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:
- Fork the repository
- Write your changes
- Make sure the tests pass
- Update the docs
- Commit your changes
- Send us a PR