glo-pixela-gcf
Update Pixela graph with google cloud functions, if glo boards is updated.
Prepare
- Setup GCP account to use cloud functions.
- Setup GCloud commandline tool (should be enable
beta
).- If you don't setup gcloud, you can deploy function with gcp web console.
Getting Started
-
Clone this repository
$ git clone https://github.com/ryosms/glo-pixela-gcf.git
-
Setup a graph on Pixela
- If you don't have a pixela account, create an account.
- Create a graph with
int
type andnone
selfSufficient. - Create both webhooks
increment
anddecrement
- If you use JetBrains' IDE, you can create a graph on your IDE. See pixela/README
-
Setup your environment variables
- Copy the file
sample.env.yml
to.env.yml
- Edit
.env.yml
for your environment
- Copy the file
-
Deploy function
$ cd cloudfunctions $ gcloud functions deploy glo-to-pixela \ --runtime go111 \ --entry-point GloToPixela \ --trigger-http \ --region <YOUR-REGION-HERE> \ --env-vars-file ../.env.yml
- After deploy success, the function has endpoint. ex: https://-.cloudfunctions.net/glo-to-pixela
-
Setup Glo Board webhook.
- Create a board if you have no boards.
- Add a webhook on
Board Settings
.- Name:
any
- Payload URL: the function's endpoint
- Content Type:
application/json
- Trigger Event: only
Card
- Name:
-
Use Glo Board
- Add Cards
- Delete Cards
- Archive Cards
- and more...
-
Pixela Graph is updated!
- Example