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

iheartradio

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iheartradio

Get information from IHeartRadio's Website about stations and possibly more in the future.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

IHeartRadio API for Node.js

This is a FAN module of IHeartRadio's API. Parameters may change as more get discovered or found.

Examples

Searching

const ihr = require("iheartradio");
ihr.search("My 99.5", {"maxRows": 3}).then(results => {
  console.log(results);
}).catch(console.error);

Getting Stream Info

const ihr = require("iheartradio");
ihr.getStreamInfo(2385).then(stream => {
  console.log(stream);
}).catch(console.error);

Getting Album Info

const ihr = require("iheartradio");
ihr.getStreamInfo(46356280).then(album => {
  console.log(album);
}).catch(console.error);

Options

All options are included in one object found in the example at the bottom.

URL Options

  • secure#boolean - Changes from https to http.

Query Options

getAlbumInfo

  • As of right now there are no known queries.

getSteamInfo

  • As of right now there are no known queries.
  • maxRows#number - Changes the amount of results you'll get.
  • bundle#boolean - Change to false to allow individual output using the options below.
    • station#boolean - Allow stations in output.
    • artist#boolean - Allow artists in output.
    • album#boolean - Allow albums in output.
    • track#boolean - Allow tracks in output.
    • playlist#boolean - Allow playlists in output.
    • podcast#boolean - Allow podcasts in output.
  • countryCode#string - The country in which to use the URL. If you used US for example, it'd use us.api.iheart.com and add &countryCode=US to the request URL.
  • startIndex#number - Possibly used for pagination.

Example

const ihr = require("iheartradio");
ihr.search("99", {
  "secure": false,
  "maxRows": 25, 
  "bundle": false,
  "station": true,
  "artist": false,
  "album": false,
  "track": false,
  "playlist": false,
  "podcast": false
  }).then(results => {
  console.log(results); // An output only including 25 found stations.
}).catch(console.error);

Keywords

iheart

FAQs

Package last updated on 07 Jan 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