Socket
Socket
Sign inDemoInstall

node-hackgenius

Package Overview
Dependencies
71
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-hackgenius

A very simple API for searching and retrieving content from Genius.com. No support for annotations yet. Whats the point? Peer reviewed lyrics.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
8.46 MB
Created
Weekly downloads
 

Readme

Source

Hack Genius

A very simple API for searching and retrieving content from Genius.com. No support for annotations yet. Whats the point? Peer reviewed lyrics.

Returns Bluebird promises.

API

search(req: string): Promise<GeniusSearchResult[]>

genius.search('adoration of the magi')
  .then(console.log)

// =>

[ { artist: 'Lupe Fiasco (Ft. Crystal Torres)',
    title: 'Adoration Of The Magi',
    url: 'http://genius.com/Lupe-fiasco-adoration-of-the-magi-lyrics',
    id: 663358 },
  { artist: 'Rap Genius',
    title: 'Top 10 Lines from Tetsuo & Youth',
    url: 'http://genius.com/Rap-genius-top-10-lines-from-tetsuo-and-youth-lyrics',
    id: 690434 },
  { artist: 'Lupe Fiasco',
    title: 'Tetsuo & Youth Tracklist and Album Cover',
    url: 'http://genius.com/Lupe-fiasco-tetsuo-and-youth-tracklist-and-album-cover-annotated',
    id: 601621 }, ... ]

getContent(req: string|GeniusSearchResult): Promise<string>

genius.getContent('adoration of the magi') // gets first result
  .then(console.log) // =>

... lupe ...

genius.search('sing about me')
  .then(function(results) {
    return genius.getContent(results[0]);
  })
  .then(function(result) {
    console.log(result) // ... kendrick ...
  })

FAQs

Last updated on 16 Feb 2015

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