Skip to content

Latest commit

 

History

History
122 lines (84 loc) · 5.33 KB

BodyTimeSeriesApi.md

File metadata and controls

122 lines (84 loc) · 5.33 KB

fitbit_web_api.BodyTimeSeriesApi

All URIs are relative to https://api.fitbit.com/

Method HTTP request Description
get_body_resource_by_date_period GET /1/user/-/body/{resource-path}/date/{date}/{period}.json Get Body Time Series
get_body_resource_by_date_range GET /1/user/-/body/{resource-path}/date/{base-date}/{end-date}.json Get Body Time Series

get_body_resource_by_date_period

get_body_resource_by_date_period(_resource_path, _date, period)

Get Body Time Series

Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.

Example

from __future__ import print_function
import time
import fitbit_web_api
from fitbit_web_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
configuration = fitbit_web_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fitbit_web_api.BodyTimeSeriesApi(fitbit_web_api.ApiClient(configuration))
_resource_path = '_resource_path_example' # str | The resource path, which incudes the bmi, fat, or weight options.
_date = '2013-10-20' # date | The range start date in the format yyyy-MM-dd or today.
period = 'period_example' # str | The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.

try:
    # Get Body Time Series
    api_instance.get_body_resource_by_date_period(_resource_path, _date, period)
except ApiException as e:
    print("Exception when calling BodyTimeSeriesApi->get_body_resource_by_date_period: %s\n" % e)

Parameters

Name Type Description Notes
_resource_path str The resource path, which incudes the bmi, fat, or weight options.
_date date The range start date in the format yyyy-MM-dd or today.
period str The range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, or max.

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_body_resource_by_date_range

get_body_resource_by_date_range(_resource_path, base_date, end_date)

Get Body Time Series

Returns time series data in the specified range for a given resource in the format requested using units in the unit system that corresponds to the Accept-Language header provided.

Example

from __future__ import print_function
import time
import fitbit_web_api
from fitbit_web_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
configuration = fitbit_web_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = fitbit_web_api.BodyTimeSeriesApi(fitbit_web_api.ApiClient(configuration))
_resource_path = '_resource_path_example' # str | The resource path, which incudes the bmi, fat, or weight options.
base_date = '2013-10-20' # date | The range start date in the format yyyy-MM-dd or today.
end_date = '2013-10-20' # date | The end date of the range.

try:
    # Get Body Time Series
    api_instance.get_body_resource_by_date_range(_resource_path, base_date, end_date)
except ApiException as e:
    print("Exception when calling BodyTimeSeriesApi->get_body_resource_by_date_range: %s\n" % e)

Parameters

Name Type Description Notes
_resource_path str The resource path, which incudes the bmi, fat, or weight options.
base_date date The range start date in the format yyyy-MM-dd or today.
end_date date The end date of the range.

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]