Skip to content

Commit

Permalink
Add links support
Browse files Browse the repository at this point in the history
  • Loading branch information
chamerling committed Jan 22, 2013
1 parent 7a25d54 commit f772226
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions example/links.js
@@ -0,0 +1,31 @@
var geeklist = require('../')

var gklst = geeklist.create({
consumer_key: ''
, consumer_secret: ''
// , api_server: 'http://sandbox-api.geeklist'
// , www_server: 'http://sandbox.geekli.st'
})

gklst.auth({
token: ''
, secret: ''
})

// display popular links
console.log(gklst.links())

// get my own links
console.log(gklst.user().links())

// get links from a user
console.log(gklst.users('chapel').links())

// create a new link
/*
gklst.links().create({
url: url,
title: title
}, function(err, data) {
});
*/
1 change: 1 addition & 0 deletions lib/geeklist.js
Expand Up @@ -262,6 +262,7 @@ var resource = function(uri) {
}
Geeklist.prototype.cards = resource('cards')
Geeklist.prototype.micros = resource('micros')
Geeklist.prototype.links = resource('links')

Geeklist.prototype.activity = function(params, callback) {
var uri = 'activity'
Expand Down
1 change: 1 addition & 0 deletions lib/resources.js
Expand Up @@ -78,6 +78,7 @@ var resources = [
, o('followers', 'followers')
, o('connections', 'connections')
, o('activity', 'activities')
, o('links', 'links')
]

resources.forEach(function(resource) {
Expand Down

0 comments on commit f772226

Please sign in to comment.