RapGenius-JS
rapgenius-js is a simple client that enables you to query RapGenius(www.rapgenius.com) and retrieve information about rap and rock artists and songs.
Rationale
This project was created because RapGenius do currently not support a node.js API.
Installation
$ npm install rapgenius-js
Usage
The API is very simple to use and currently enables you to perform the following:
Model objects
Artist
Artist
- name: String
- link: String
- popularSongs: Array (of String)
- songs: Array (of String)
Song
Song
- name: String
- artists: String
- link: String
Lyrics
Verses
- id: int
- content: String
- explanation: String
Section
- name: String
- content: String
- verses: Array (of Verses)
Lyrics
- songId: int
- songTitle: String
- mainArtist: String
- featuringArtists: Array (of String)
- producingArtists: Array (of String)
- sections: Array (of Section)
Search for an artist:
var rapgeniusClient = ; rapgeniusClient; //Example for a rock artistrapgeniusClient;
Search for a song:
var rapgeniusClient = ; rapgeniusClient;
Search for the lyrics of a song along with their meaning:
var rapgeniusClient = ; var { iferr console; else //Printing lyrics with section names var lyrics = lyricsAndExplanationslyrics; var explanations = lyricsAndExplanationsexplanations; console; console; //Now we can embed the explanations within the verses lyrics; var firstVerses = lyricssections0verses0; console; }; var { iferr console; else ifsongslength > 0 //We have some songs rapgeniusClient; }; rapgeniusClient;
Additional features
I will work on the following features when I get the time:
- Refactor code base
- Improve performance
Licence
MIT (Make It Tremendous)