New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pandora.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pandora.js

A Node.js Port of the Unofficial Pandora Radio API

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

Pandora.js Build Status Dependency Status codecov Discord

Pandora.js is an interface with the Pandora Radio API. You can find the documentation for this API here.

Usage

Login

You can use two main methods for logging in. You can wait for the ready event, or you can use the returned promise from the login function.

const { Client } = require("pandora.js");
const client = new Client();
(async () => {
  await client.login("username", "password");
  console.log("Ready!");
})();
const { Client } = require("pandora.js");
const client = new Client();
client.on("ready", () => {
  console.log("Ready!");
});
client.login("username", "password");

Stations

After logging in, you can fetch a station.

const stations = await client.user.getStations();
console.log(stations.first().name);

Getting Some Songs

After you've got a station, you can then get some songs. Pandora gives you 5 songs on request when using this function.

const songs = await station.getSongList(true);
songs.forEach(song => {
  console.log("Song Name: " + song.title);
});

⚠ Usage Conditions

This API is fan-made, and since the Pandora API is technically private we have to literally discover the different methods that you can use. This means that there is not a full understanding of how the API works, how it will change, or if it will even continue to work. Pandora does NOT ensorse the usage of this API at any point and IS against their Terms of Service. Please keep this in mind before you continue using this module. You use this module at your own risk, meaning if Pandora comes after you for breaking their Terms of Service, you cannot blame this API. To reduce any risk, always play ads on a non-premium user account.

Keywords

pandora

FAQs

Package last updated on 28 Nov 2018

Did you know?

Socket

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.

Install

Related posts