Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-hackgenius

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 16 Feb 2015

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc