Future Diary SDK for Node.js
$ npm i future-diary-sdk
const Future = require('future-diary-sdk');
const f = new Future({
host: 'weilairiji.com',
username: '',
password: ''
});
(async () => {
try {
// GET
const timeline = await f.get('/statuses/user_timeline', {id: 10962});
console.log(timeline);
// POST
const result = await f.post('/statuses/update', {status: 'unicorn'});
console.log(result);
} catch (err) {
console.log(err);
}
})();
For more APIs, see the Future Diary API doc.
f.get(uri, params);
f.post(uri, params);
- future-diary-cli - CLI for this module
- fanfou-sdk - Fanfou SDK for Node.js
MIT © Future Diary