From 73ee18565449573463d27a8a0d00c75e7538fa2e Mon Sep 17 00:00:00 2001 From: John Tantalo Date: Sat, 20 Dec 2014 13:05:49 -0800 Subject: [PATCH] added google credentials setup to readme --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e388f4..bcf5ad0 100644 --- a/README.md +++ b/README.md @@ -8,29 +8,39 @@ Currently, it only copies weight data from Fitbit to Google. Use `virtualenv` to create an environment to install required packages, - $ virtualenv env + $ virtualenv env Activate the environment in your shell, - $ source env/bin/activate + $ source env/bin/activate Use `pip` to install the required packages, - $ pip install -r requirements.txt + $ pip install -r requirements.txt + +### Google Credentials + +[Create a project in Google Developers Console and enable the fitness API](https://console.developers.google.com/flows/enableapi?apiid=fitness). Note the client id and client secret. + +Run `auth_google.py` to get credentials for write access to a user's body data, + + $ python auth_google.py [YOUR CLIENT ID] [YOUR CLIENT SECRET] https://www.googleapis.com/auth/fitness.body.write + +This script opens a browser window where you can log in to your Google account and authorize the app to "View and store body sensor data in Google Fit". When you accept, the script writes the credentials to a local file named `google.json`. ## Usage Run `fitsync.py` to download data from Fitbit and upload to Google, - $ python fitsync.py + $ python fitsync.py Use the `delete` command to remove data from Google, - $ python fitsync.py delete + $ python fitsync.py delete Use the `get` command to see the data stored in Google, - $ python fitsync.py get + $ python fitsync.py get ## See your data