Previous topic

Welcome to get_jawbone_data’s documentation!

Next topic

get_sleep_data module

This Page

access_jawbone module

synopsis:Use python to connect to Jawbone UP API, request, load, and process JSON data
access_jawbone.args_store(args)[source]

args_store receives command-line arguments

run command: python get_data.py user_email user_password data_url

param file:get_data.py, create script similar to get_sleep_data.py example
param arg1:user_email
param arg2:user_password
param arg3:data_url, visit Jawbone Data Endpoints to see options
access_jawbone.authenticate(user, passwd)[source]

aunthenticate provides secure access to Jawbone user data

param input_user:
 email address from arg1
param input_password:
 password from arg2
returns:security token that is required for accessing Jawbone user data
access_jawbone.format(entry)[source]

format is helpful for converting epoch timestamp into readable datetime format

param entry:epoch timestamp
returns:datetime in 'YYYY-MM-DD HH:MM:SS' format
access_jawbone.get_data(link, token)[source]

get_data is envoked to “GET” JSON data from Jawbone API

param url:data request link from arg3, see options at Jawbone Data Endpoints
param token:security token (returned from ‘authenticate’ function)
returns:requested Jawbone data in JSON format