A simple tool to append data to a Google Sheet. This tool also handles the authentication required to interact Google Sheets.
Before you can use the tool you will need to ensure that you have access to the following S3 bucket within The Times Dev account:
gsh refresh-token: This command will help you generate a new access token required to access the desired spreadsheet. Note the command must be run by someone with Read/Write access to the spreadsheet. This command should only be run by the Tools Team.
gsh set-sheet-location: This command will set the sheet location. The sheet will then be used by the 'update-sheet' command. This command should only be run by the Tools Team.
set-api-credentials: This command will set the Google API credentials required to use the spreadsheet API. This command should only be run by the Tools Team.
gsh update-sheet [options]: This command will update the sheet with the content provided in options. E.g. 'gsh update-sheet "this,is,a,test".
Code 1: Unknown error occurred
Code 2: Invalid credentials
Code 3: Invalid request has been made. This could be the spreadsheet id, document id or content.
Code 4: Credentials stored on the bucket are not valid for this document. Share the document with the user account.
Code 5: Invalid user input provided.
Code 6: Failed to upload the sheet configuration.
Code 7: Failed to update the API credentials.
yarn to get the dependencies
yarn build to build the project (must be done when making changes)
npm link to create the symbolic link for running the binary from your terminal e.g.
yarn test to run all tests