Closed trudeauperron closed 2 years ago
@trudeauperron the get_activity()
function is just a simple API call with the URL https://www.strava.com/api/v3/activities/, where the activity id is attached to the end. The return call is whatever the API wants to provide and I don't think there's a way to specify which fields are returned. These are the fields returned from my most recent activity (sorted alphabetically):
[1] "achievement_count" "athlete" "athlete_count" "available_zones"
[5] "average_heartrate" "average_speed" "best_efforts" "calories"
[9] "comment_count" "commute" "description" "device_name"
[13] "display_hide_heartrate_option" "distance" "elapsed_time" "elev_high"
[17] "elev_low" "embed_token" "end_latlng" "external_id"
[21] "flagged" "from_accepted_tag" "gear_id" "has_heartrate"
[25] "has_kudoed" "heartrate_opt_out" "hide_from_home" "id"
[29] "kudos_count" "laps" "location_city" "location_country"
[33] "location_state" "manual" "map" "max_heartrate"
[37] "max_speed" "moving_time" "name" "perceived_exertion"
[41] "photo_count" "photos" "pr_count" "prefer_perceived_exertion"
[45] "private" "resource_state" "segment_efforts" "similar_activities"
[49] "splits_metric" "splits_standard" "start_date" "start_date_local"
[53] "start_latitude" "start_latlng" "start_longitude" "stats_visibility"
[57] "timezone" "total_elevation_gain" "total_photo_count" "trainer"
[61] "type" "upload_id" "upload_id_str" "utc_offset"
[65] "visibility" "workout_type"
I did not include a "private note" for this activity, but I'm curious if that is returned with the API call if one is provided.
@fawda123 Thanks for your answer. I tried to include the "private note" in my activity and nothing was return by the API.
Yea, my guess is it's not something exported by the Strava API. Not much I can do on my end about that.
Hi,
Since this summer, strava added the "private_note" field for the activities. Is there a way to extract this field with the function get_activity() ?