Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

future-diary/future-diary-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

future-diary-sdk

Future Diary SDK for Node.js

Install

$ npm i future-diary-sdk

Usage

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.

API

f.get(uri, params);
f.post(uri, params);

Related

License

MIT © Future Diary