Closed cigolpl closed 8 years ago
Yes, API for Node is something I'll implement soon, and the stdout idea is great, I'll try to address it too :) Thanks!
That's cool! :)
What do you think about doing API like that ?
var Gsjson = require('gsjson');
Gsjson({
id: 'abc123456789',
worksheet: 0,
token: 'token',
vertical: false,
listOnly: false
}, function(err, data) {
console.log(data)
});
Let me know If I could help because I would like to make integration google spreadsheet with https://github.com/itemsapi/itemsapi
That's exactly what I have in mind, but returning a Promise.
Yeah, Promise is even better :)
Hi @bassarisse, I've prepared PR #6 for this issue.
It has the same logic as before except saving result to file.
Currently it is enough to gsjson spreadsheetid >> file.json
or gsjson spreadsheetid | jq '.'
(https://stedolan.github.io/jq/)
Additionally added some tests and simplified code and we can use it now as npm module (more details in example.js).
Let me know if that solution looks good for you - if yes then I can update docs and we can merge that
That's great. I merged and took the liberty of making some changes:
mocha
and should
as dev dependenciesThat looks cool, thanks!
Do you have in plan make it working not only by CLI but runnable by node.js code too ?
In my opinion it would be more flexible too if the result goes to the stdout instead saving to file then
gsjson 1ZQotT7YZHyIrrIlrzuwMx9Eb8ofwy3PG7RP4a1JrU1o >> data.json
Anyway, very good job with that tool, works fine in CLI!