node-freee-api
Install
$ npm install freee-api
Overview
freee API v1.0 API Client.
var Freee = require('freee-api');
var freee = new Freee({
appId: config.appId,
secret: config.secret,
callback: config.callback
});
var url = freee.getAuthorizeURL();
freee.fetchToken(req.query.code, function(err, token) {
freee.me(function(err, user) {
console.log(user.email);
});
freee.companies(function(err, companies) {
console.log(companies.name);
});
});
Run example app
- create new application from here and get appId and Secret.
- Set callback url to
http://localhost:9000/callback
. - Run below commands.
$ git clone git@github.com:hokaccha/node-freee-api.git
$ cd node-freee-api
$ npm install
$ cd example/webapp
$ echo APP_ID=your-app-id >> .env
$ echo SECRET=your-app-secret >> .env
$ node app.js
TODO
License
MIT