pinboard-api
v0.0.6
Published
Node npm for pinboard.in
Downloads
1
Readme
Pinboard Node API
Node npm for pinboard.in
This is just a partial implementation of the api. The rest of the API will be wired up in the future.
Getting Started
Install the module with: npm install pinboard-api
var pin = require('pinboard-api');
Get Access Token
var required = {user: "username", password: "password"};
pin.getAcessToken( required, function() {
console.log( data )
//returns access_token
});
Get Update
var required = {user: "username", password: "password"};
pin.getLastupdate( required, function() {
console.log( data )
//returns time of last update
});
More info on update method
Add Bookmark
var required = {
user: "username",
token: "access_token",
url: "http://www.example.com",
title: "Title of page"
};
pin.addBookmark( required, options, function() {
console.log( data );
//returns done
});
'options' is an optional parameter and needs to be an object using the parameters of the pinboard.in add method
options = {
tags: "tag1,tag2,tag3",
toread: "yes",
....
}
Delete Bookmark
var required = {user: "username", password: "password", url: "url"};
pin.deleteBookmark( required, function() {
console.log( data )
//returns done
});
More info on delete method
Get Recent Post
var required = {user: "username", token: "access_token"};
pin.getRecent( required, options, function() {
console.log( data );
//returns recent post
});
'options' is an optional parameter and needs to be an object using the parameters of the pinboard.in post_recent method
options = {
tag: "tag1,tag2,tag3",
count: 5,
....
}
Get All Post
var required = {user: "username", token: "access_token"};
pin.getAll( required, options, function() {
console.log( data );
//returns all post
});
'options' is an optional parameter and needs to be an object using the parameters of the pinboard.in post_all method
options = {
tag: "tag1,tag2,tag3",
count: 5
}
License
Copyright (c) 2014 Tobias Wright. Licensed under the MIT license.