hatena-fotolife-api
v2.0.0
Published
Hatena::Fotolife API wrapper for Node.js (unofficial)
Downloads
24
Readme
hatena-fotolife-api
Hatena::Fotolife API wrapper for Node.js (unofficial)
Installation
npm install hatena-fotolife-api
Usage
See examples/
.
import fotolife from 'hatena-fotolife-api';
const client =
fotolife({ type: 'wsse', username: 'username', apikey: 'apikey' });
const options = { title: 'bouzuya\'s icon', file: './bouzuya.png' };
client.create(options).then(() => {
console.log('uploaded');
}, (err) => {
console.error(err);
});
Configuration (WSSE/OAuth)
WSSE
- username ... Your username.
- apikey ... See AtomPub API key.
OAuth
See "How to use Hatena OAuth".
Application scope is "read_private" or "write_private" or both.
var fotolife = require('hatena-fotolife-api');
var client = fotolife({
type: 'oauth',
consumerKey: 'consumerKey',
consumerSecret: 'consumerSecret',
accessToken: 'accessToken',
accessTokenSecret: 'accessTokenSecret'
});
// ...
API Docs
See Hatena::Fotolife Atom API, test/
and examples/
.
Development
npm run
License
Author
bouzuya <[email protected]> (http://bouzuya.net)