README
¶
GAE Fitbit Go
GAE App for getting your own sleep & activity data from fitbit and post it to google calendar.
How to deploy?
Prerequisite
Install golang and gcloud command line.
Register your GAE endpoint in Fitbit Applications and get client id, secret.
Also get client id, secret via Calendar API | Google Developers.
Deploy
cd ./app/gae-fitbit-go
cp app.yaml app.private.yaml
# write CLIENT ID, SECRET and CALENDAR ID to env_variables
vim app.private.yaml
gcloud app deploy app.private.yaml
Edit app.private.yaml like following.
env_variables:
GAE_FITBIT_GO_FITBIT_CLIENT_ID: xxxx
GAE_FITBIT_GO_FITBIT_CLIENT_SECRET: xxxxxxx
GAE_FITBIT_GO_FITBIT_AUTH_REDIRECT_URI: https://xxxxxxxxx.appspot.com/v1/fitbitstoretoken
GAE_FITBIT_GO_FITBIT_GCAL_SLEEP_CAL_ID: sssssssss@group.calendar.google.com
GAE_FITBIT_GO_FITBIT_GCAL_ACTIVITY_CAL_ID: aaaaaaaaaa@group.calendar.google.com
GAE_FITBIT_GO_GCAL_CLIENT_ID: xxxxxxxxx.apps.googleusercontent.com
GAE_FITBIT_GO_GCAL_CLIENT_SECRET: xxxxxxxxxxxxx
GAE_FITBIT_GO_GCAL_AUTH_REDIRECT_URI: https://xxxxxxxxx.appspot.com/v1/gcalstoretoken
USE_CLOUD_STORAGE: true
CLOUD_STORAGE_BUCKET_NAME: xxxxxxxxx
GOOGLE_APPLICATION_CREDENTIALS: app/gae-fitbit-go/xxxxxxxx.json
Set cron setting
job scheduling with cron.yaml | Go | Google Cloud
gcloud app deploy cron.yaml
architecture
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
domain
|
|
auth
Package auth is a generated GoMock package.
|
Package auth is a generated GoMock package. |
fitbit2gcal
Package fitbit2gcal is a generated GoMock package.
|
Package fitbit2gcal is a generated GoMock package. |
infra
|
|
internal
|
Click to show internal directories.
Click to hide internal directories.