gae-fitbit-go

module
v0.0.0-...-4eeaa7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT

README

GAE Fitbit Go

Actions Status

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
command
Package command is a generated GoMock package.
Package command is a generated GoMock package.
di

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL