json-to-google-sheets
v1.0.2
Published
Using Sheets API for uploading/downloading JSON files
Downloads
3
Maintainers
Readme
json-to-google-sheets
Using Google APIs for uploading/downloading JSON files.
It will help you to sync your json data with google sheet. :)
Install
$ yarn add -d json-to-google-sheets
Usage
const JG = require( 'json-to-google-sheets' )
const jsonToGoogleSheet = new JG.JSONToGoogleSheet( {
// Saving token as local file
isCachedTokenRequired: true
} )
// Get oAuth token
await jsonToGoogleSheet.authorize( {
clientId: <CLIENT_ID>,
clientSecret: <CLIENT_SECRET>,
redirectUri: <REDIRECT_URI>
} )
// Invoke task
const { data: resCreateSheet } = await jsonToGoogleSheet.invokeTask(
<GOOGLE-SHEET-UTIL>,
<QUERY>
)
API references
Get Credentials
https://console.developers.google.com/apis/credentialsSheets APIs
https://developers.google.com/sheets/api/reference/restDrive APIs
https://developers.google.com/drive/api/v3/about-sdk
License
MIT Licensed