synopsis: | Use python to connect to Jawbone UP API, request, load, and process JSON data |
---|
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
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
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
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