Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielefongo/togglino


https://github.com/danielefongo/togglino

Last synced: 7 days ago
JSON representation

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
```