Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active October 31, 2021 13:41
Show Gist options
  • Save wilmoore/19d30c1b02691ae9a086245c80a7039b to your computer and use it in GitHub Desktop.
Save wilmoore/19d30c1b02691ae9a086245c80a7039b to your computer and use it in GitHub Desktop.
Income Sources :: Product :: Song Lyric Search

Income Sources :: Product :: Song Lyric Search

⪼ Made with 💜 by realpolyglot.dev

Developer Account

ENV SECRETS

Sign up for a Developer Account

New API Client

API Clients

API Token

Libraries

dependencies

Tutorial

Install Dependencies
npm install --save genius-lyrics
Setup Environment
set -x GENIUS_ACCESS_TOKEN '(( CLIENT ACCESS TOKEN ))'
API Client Library REPL Sandbox
node

> const Genius = require('genius-lyrics');
> const Client = new Genius.Client(process.env.GENIUS_ACCESS_TOKEN);
> Client.songs.search('who said it was easy claimin dogg pound').then((songs) => console.log(songs[0]))
Promise { <pending> }

(( SPACE_INTENTIONAL ))

> Song {
  client: <ref *1> Client {
    key: '_bIHcWhnwmKH3gIsT65ZA9wKP1NFLW2XKX68cPzohnRc1j1fMopSjhYn-aXbaQlB',
    config: {},
    songs: SongsClient { client: [Circular *1] },
    artists: ArtistsClient { client: [Circular *1] },
    api: Requester { url: 'https://api.genius.com', options: [Object] }
  },
  partial: true,
  title: 'These Days',
  fullTitle: 'These Days by Nate Dogg (Ft. Daz Dillinger)',
  featuredTitle: 'These Days (Ft. Daz Dillinger)',
  id: 34968,
  thumbnail: 'https://images.genius.com/0717e124a8888ffd6edce83dc7ce6a4b.300x299x1.jpg',
  image: 'https://images.genius.com/0717e124a8888ffd6edce83dc7ce6a4b.937x934x1.jpg',
  url: 'https://genius.com/Nate-dogg-these-days-lyrics',
  endpoint: '/songs/34968',
 
 > Client.songs.search('who said it was easy claimin dogg pound').then((songs) => songs[0].lyrics().then(console.log))
Promise { <pending> }

(( SPACE_INTENTIONAL ))

> [Chorus: Nate Dogg]
These days, you gotta be strapped
I'm already knowin' ain't nobody got my back
These days you gotta be down
Who said it was easy claimin' Dogg Pound?

These days, you gotta be strapped
I'm already knowin' ain't nobody got my back
These days you gotta be down
Who said it was easy claimin' Dogg Pound?

[Verse 1: Nate Dogg]
I believe I got good skills
We been makin' music since we were kids
Thats all I wanna do for life
Keepin it real until the day I die
Obstacles get in my way
Continue to mash and don't forget to pray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment