import requests


def query_hr_time_series(access_token, date):
    """ Query heart rate intra-day time series endpoint
    :param access_token:
    :param date:
    :return: json
    """
    headers = {'Authorization': 'Bearer %s' % access_token}
    hr_url = 'https://api.fitbit.com/1/user/-/activities/heart/date/%s/1d/1min.json' % date
    result = requests.get(hr_url, headers=headers)
    return result.json()