Hypem NodeJS Wrapper
This is an unofficial nodejs wrapper around the (undocumented? -- I couldn't find anything) Hype Machine (http://hypem.com) public API. It is a port of @JackCA's implementation of a Ruby gem of the API. Note that there are some differences.
Installation
npm install node-hypem
Usage
For general usage:
var Hypem = ;
The Hypem
object has both a Playlist
object, which can grab information
about the various song lists on the hypem website, and a User
object
which returns playlists specific to the provided user.
All callbacks are of the form function(err, response)
.
Playlist
Playlist functions return JSON playlist data. All parameters except for
filter
are required (which defaults to all
). As the API does not
provide cursors, paging may have concurrency issues if you don't monitor
changes.
// Filter options: "all", "lastweek", "remix", "noremix", "artists", "twitter"Hypemplaylist // Filter options: "all", "remix", "noremix", "fresh", or country code // ("ca", "us", "fr", etc) Hypemplaylist Hypemplaylist // "blog_id" is the siteid (number), not it's nameHypemplaylist Hypemplaylist // API warns against using too many tagsHypemplaylisttagstag_array page_number callback
User
Hypem.user(user_name)
creates a new user object. If the username is invalid,
null
is returned.
The following requests return playlists of tracks specific to the user.
HypemHypemHypemHypemHypemHypem
Additionally, the following user specific requests are also available:
// Returns null on invalid usernameHypem // Returns [ ] on invalid username/no friendsHypem // Returns null on invalid username/no favorite blogsHypem