A JavaScript wrapper for the Vimeo APIs. VIH-mee-node, like VIH-mee-oh. Get it?
Install globally:
npm install -g vimenode
Or add to your package.json
:
{
"dependencies": {
"vimenode": "*"
}
}
And install with npm install
.
var vimendoe = require('vimenode').simple;
Each request type supported by the Simple API has its own corresponding function in vimenode.
vimenode.user(method, username, page, callback)
vimenode.video(video_id, callback)
vimenode.activity(method, username, page, callback)
vimenode.group(method, groupname, page, callback)
vimenode.channel(method, channelname, page, callback)
vimenode.album(method, album_id, page, callback)
@TODO: Everything. Coming soon-ish.
var v = require('vimenode').simple;
var video_ids = [];
v.user('all_videos', { username: 'username' }, function(videos) {
videos.forEach(function(video) {
video_ids.push(video.id);
});
console.log(video_ids);
});
var v = require('vimenode').simple;
v.activity('user_did', { username: 'username' }, function(activities) {
activities.forEach(function(activity) {
if (activity.type === 'follow_user') {
return v.user('info', { username: activity.subject_id }, function(user_info) {
console.log(user_info);
});
}
});
});