Socket
Socket
Sign inDemoInstall

@chatandshare/random-song

Package Overview
Dependencies
7
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @chatandshare/random-song

MusixMatch API wrapper specifically to fetch random songs!


Version published
Weekly downloads
8
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Random Song API

MusixMatch API wrapper specifically to fetch random songs!

Requirements

You'll need a MusixMatch API key to get access to random songs. It's totally free, and you can get one by clicking here

Example

const RandomSong = require('random-song');
const random = new RandomSong("YOUR_API_KEY_HERE");

(async () => {

    let very_random_song = await random.song();
    
  console.log(very_random_song); // Outputs a random song
  
    let edm_song = await random.song("edm");
    
  console.log(edm_song);;
  
  // Scroll down to see what kind of data you'll receive (in JSON)
})();

Data

{
  track_id: 194285372,
  track_name: 'Falling',
  track_name_translation_list: [],
  track_rating: 100,
  commontrack_id: 88456398,
  instrumental: 0,
  explicit: 0,
  has_lyrics: 1,
  has_subtitles: 1,
  has_richsync: 1,
  num_favourite: 2730,
  album_id: 37245143,
  album_name: 'Nicotine',
  artist_id: 28976090,
  artist_name: 'Trevor Daniel',
  track_share_url: 'https://www.musixmatch.com/lyrics/Trevor-Daniel/Falling?utm_source=application&utm_campaign=api&utm_medium=Chat+%26+Share%3A1409619829238',
  track_edit_url: 'https://www.musixmatch.com/lyrics/Trevor-Daniel/Falling/edit?utm_source=application&utm_campaign=api&utm_medium=Chat+%26+Share%3A1409619829238',
  restricted: 0,
  updated_time: '2020-02-17T10:13:22Z',
  primary_genres: { music_genre_list: [ [Object], [Object] ] }
}

Valid Genres

Over a hundred genres are supported! You can view all of them here. 😀

Information

  • By the development team @ Chat & Share.
  • Used in production by the Woof Discord bot.

FAQs

Last updated on 02 Jun 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc