
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
pandora-api
Advanced tools
This is a node.js version of the unofficial Pandora API. Due to the fact that it is unofficial, I will not be publishing it as a node module. On the other hand, I will build it like a node module and encourage that if you want to use it you can clone it into a folder and require it from there.
What about docs? Here's a GitHub IO url for the autogen documentation. https://firecontroller1847.github.io/Pandora.js-Docs/
I don't like the look of your docs! Okay, that's fine. Checkout the instructions below to generate docs. Feel free to modify the package.json :)
yarn installyarn run docsnpm installnpm run docsThen, just open up index.html in the new folder called out.
Here are some examples on how to use the module.
Method #1 (Preferred)
const { Client } = require('../node-pandora-api');
const client = new Client();
(async () => {
await client.login('myusername', 'mypassword');
console.log('Client Ready!');
});
Method #2
const { Client } = require('../node-pandora-api');
const client = new Client();
client.on('ready', () => {
console.log('Client Ready!');
});
client.login('myusername', 'mypassword');
Method #3
const { Client } = require('../node-pandora-api');
const client = new Client();
client.login('myusername', 'mypassword').then(() => {
console.log('Client Ready!');
});
All further examples should happen AFTER you're logged in.
const stations = await client.user.getStations();
console.log(JSON.stringify(stations, null, 2));
Simple right?
Because, it's Pandora. This is what the app does.
// Assuming you now have the stations variable from above.
const station = stations.first(); // Get the first station, unless you want to sift through them and find the one you want.
const songs = await station.getSongList(true); // This is the first time we're getting the song list, so we need to specify that using `true`.
console.log(JSON.stringify(songs, null, 2));
Congradulations, you've successfully gotten some songs! Now, just make a get request to one of the song's audioURL's, and you're on your way!
All Pandora methods may not be completed. I've taken the time and effort to reverse engineer the Pandora API (with some help of this doc sheet, although not much), but since Pandora doesn't ensorse the usage of this API, they may change things at will without notice. Versions of this module will break randomly, and patches may or may not be fixed. All pull requests to help add more methods or items to the API are appreciated.
Pandora does not endorse the usage of this API, and it may even get your account banned. If you use this API to pirate songs or play songs without playing the additional ads for them, you are doing so at your own risk. This API is merely to provide a way to use Pandora in Node.js. What you do with it is on you. If Pandora Media comes after you, sues you, or anything similar because your app is breaking the terms of service (or anything similar), you CANNOT blame this API.
You must ALWAYS play ads on a non-premium user account!
FAQs
A Node.js Port of the Unofficial Pandora Radio API
We found that pandora-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.