First Listen API
Query data from NPR First Listen
$ npm install --save first-listen-api
usage
With CommonJS
var firstListenApi =
You can access the full NPR First Listen archive, much like viewing http://www.npr.org/series/98679384/first-listen
firstListenApi
archive
will be an array of objects. Some represent a "review" and others represent a "first-listen" album. Here are some examples:
type: 'first-listen' artist: '' album: '' streaming: true // if the album is _currently_ available for streaming url: 'http...' type: 'review' artist: '' album: '' url: 'http...'
If you'd like to see past the first page of results, you can specify a start
. It defaults to 0
firstListenApi
To get further than this, you'll need an API key. We'll assume you have one and call it apiKey
.
If you have an NPR First Listen URL and you want the album artwork, I've got just what you're looking for.
firstListenApi
If you have an NPR First Listen URL that is currently streaming
and you want the individual songs in that album, you can find them here:
firstListenApi
songs
will be an array of objects. Those objects will look something like this:
track: 1 title: '' artist: '' album: '' url: 'http...'
That's all for now.