Groov
A wrapper around the unofficial pandora API. Please keep in mind, that the Pandora API is unofficial, meaning Pandora may change it.
This package allows for async/await requests with the Pandora API, moving await from callback hell in earlier versions.
The list of valid requests to the API can be found here
Installation
Simply import the package into your project with import or ES6
import Groovy from 'groo-v'
or in NodeJS
const Groovy = require('groo-v')
Usage
Firstly, one would need to provide their Pandora credentials when calling the construtor, for example:
const Groov = const pandora = 'USERNAME' 'PASSWORD'
Secondly, they would have to call the login
function and await
it appropriately.
I.E:
const Groov = const pandora = 'USERNAME' 'PASSWORD' // Some async functionasync await pandora
Lastly, now that you have been authenicated, you can now call unofficial requests from Pandora.
For example:
const Groov = const pandora = 'USERNAME' 'PASSWORD' // Some async functionasync { await pandora const result = await pandora // [ Your data here }
Testing
To test provide your valid pandora login via EMAIL and PASSWORD env
variables. I.E:
$ EMAIL=foobar@gmail.com PASSWORD=super-secret yarn test
TESTING WITHOUT PROVIDING CREDENTIALS WILL SURELY RESULT IN FAILED TESTS