exfm logo belongs to exfm. Node.js logo belongs to Node.js. This project is not an official exfm project and is not affliated with.
Connect to the ex.fm API, get information and stream music!
exfm.user("silvinci").loved(cb);
exfm.song("8ugg").pipe(fs.createWriteStream("never.mp3"));
exfm.song.search("Never Gonna Give You Up");
$ npm install exfm
The exfm API makes use of chaining. Who doesn't like chaining?
Get a user's profile information.
exfm.user("dan", function(err, user) {
if(err) throw err;
console.log(user.name); // "Dan Kantor"
});
Get a user's loved songs.
exfm.user("dan").loved(function(err, songs) {
if(err) throw err;
console.log(songs); // [{ title: "Golden Light", ... }, ...]
});
Get a user's followers.
exfm.user("dan").followers(function(err, users) {
if(err) throw err;
console.log(users); // [{ username: "silvinci", ... }, ...]
});
Get users a user is following.
exfm.user("dan").following(function(err, users) {
if(err) throw err;
console.log(users); // [{ username: "majman" ... }, ...]
});
Get the IDs of the users the user is following.
exfm.user("dan").followingIds(function(err, ids) {
if(err) throw err;
console.log(ids); // ["majman", "chase", ...]
});
Get sites the user is following.
exfm.user("dan").followingIds(function(err, sites) {
if(err) throw err;
console.log(sites); // [{ name: "Black Light Dinner Party" }, ...]
});
Get a feed of songs loved by users the user is following.
exfm.user("dan").loveFeed(function(err, songs) {
if(err) throw err;
console.log(songs); // [{ object: { title: "Where's The Time", ... }, ... }, ...]
});
Get a feed of a user's activity, including loved songs, shared songs, and followed users.
exfm.user("dan").activity(function(err, activities) {
if(err) throw err;
console.log(activities); // [{ object: { title: "Where's The Time", ... }, ... }, ...]
});
Get a feed of a user's loved songs.
exfm.user("dan").activityLove(function(err, loves) {
if(err) throw err;
console.log(loves); // [{ object: { title: "Where's The Time", ... }, ... }, ...]
});
Get a feed of actions being perfomed on the user, such as loving of songs the user has loved (AKA relove) and following the user-
exfm.user("dan").notifications(function(err, msgs) {
if(err) throw err;
console.log(msgs); // [...]
});