Created
January 2, 2023 17:58
-
-
Save trnl/87a9331909bc9aa7718a1b6a6353044f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as http | |
import pandas as pd | |
headers = { "Authorization": "Bearer gAAAA...."} | |
athlete_id = "....." | |
start_date = "2022-12-01" | |
end_date = "2023-07-01" | |
workouts = http.get(f"https://tpapi.trainingpeaks.com/fitness/v6/athletes/{athlete_id}/workouts/{start_date}/{end_date}", headers=headers).json() | |
atp = http.get(f"https://tpapi.trainingpeaks.com/fitness/v1/athletes/{athlete_id}/atp/{start_date}/{end_date}", headers=headers).json() | |
dw = pd.DataFrame(workouts) | |
da = pd.DataFrame(atp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment