Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielefongo/togglino
https://github.com/danielefongo/togglino
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danielefongo/togglino
- Owner: danielefongo
- Created: 2019-10-16T11:21:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T05:53:05.000Z (almost 2 years ago)
- Last Synced: 2023-02-28T03:07:48.553Z (over 1 year ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Requirements
```
npm install @google/clasp -g
clasp login
npm install serverless -g
```Enable google apps script [here](https://script.google.com/home/usersettings)
### Environment variables
This project requires these variables (to be put in `.env` file in the root of the project)
```
TOGGL_API_TOKEN=
TOGGL_WORKSPACE_ID=
TOGGL_CLIENT_ID=
GOOGLE_SCRIPT_ID=
GOOGLE_API_ID=
GOOGLE_SHEET_ID=```
### Setup
```
npm install
source .env
echo "{\"scriptId\":\"${GOOGLE_SCRIPT_ID}\"}" > sheets/.clasp.json
```### Deploy
To deploy google script, run the following command:
```
./publish.sh
```To deploy lambda function using servless, run the following command:
```
sls deploy
```### Test
```
source .env
curl -L --insecure https://script.google.com/macros/s/$GOOGLE_API_ID/exec
```