Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Map Strength exercises even for non-Guide workouts #447

Closed
philosowaffle opened this issue Feb 28, 2023 · 0 comments · Fixed by #450
Closed

[Feature] Map Strength exercises even for non-Guide workouts #447

philosowaffle opened this issue Feb 28, 2023 · 0 comments · Fixed by #450
Labels
enhancement new feature / improvments

Comments

@philosowaffle
Copy link
Owner

philosowaffle commented Feb 28, 2023

Using the Ride API endpoint, it looks like we can get the movement and exercises for a given class. This can be used to populate Strengthworkouts on Garmin, even for users who don't have a Guide.

  1. This will only work for Strength & Core workouts at this time
    1. Garmin FIT file does not provide Exercises for Yoga/Stretching yet
  2. This will only work on recently created classes which include detailed Class Plan information listing out all of the exercises

firefox_2023-03-04_08-38-29

https://api.onepeloton.com/api/ride/2c4ab934d4ac481483fd496110f59e2d/details?stream_source=multichannel&include=sampled_top_tags
payload ```json { "segments": { "segment_list": [ { "id": "ca88128c7b224e51b4d8870c90b2681a", "length": 1020, "start_time_offset": 0, "icon_url": "https://s3.amazonaws.com/static-cdn.pelotoncycle.com/segment-icons/yoga_flow.png", "intensity_in_mets": 4, "metrics_type": "floor", "icon_name": "yoga_flow", "icon_slug": "yoga_flow", "name": "Yin", "is_drill": false, "subsegments_v2": [ { "id": "9dd00a63a6c24738824558c176b1dfba", "type": "movement", "display_name": "Saddle Pose", "scheduled_offset": 0, "offset": 0, "length": 248, "rounds": null, "trackable_movements_disabled": false, "movements": [ { "id": "6dd0d8e4650f49fb8a1542c51a44bc42", "name": "Saddle Pose", "note": null, "slug": null, "skill_level": "beginner", "muscle_groups": [ { "muscle_group": "biceps", "display_name": "Biceps", "ranking": 1 }, { "muscle_group": "chest", "display_name": "Chest", "ranking": 3 }, { "muscle_group": "low_back", "display_name": "Low Back", "ranking": 2 }, { "muscle_group": "mid_back", "display_name": "Mid Back", "ranking": 2 }, { "muscle_group": "quads", "display_name": "Quads", "ranking": 3 } ], "short_video_url": null, "long_video_url": null, "movement_videos": [], "image_url": null, "talkback_description": "Start seated on your heels, then lean back to place your hands on your heels. If comfortable, continue to lean back onto your elbows or even further until your back is flat on the mat. Place your arms above your head." } ] }, { "id": "19b2833dfc8a4b6bbad29f5c3cca3869", "type": "movement", "display_name": "Half Butterfly Pose", "scheduled_offset": 240, "offset": 248, "length": 532, "rounds": null, "trackable_movements_disabled": false, "movements": [ { "id": "c3076b1f28124b00a36a1d73b7a6ed79", "name": "Half Butterfly Pose", "note": null, "slug": null, "skill_level": "beginner", "muscle_groups": [ { "muscle_group": "hamstrings", "display_name": "Hamstrings", "ranking": 3 }, { "muscle_group": "hips", "display_name": "Hips", "ranking": 2 }, { "muscle_group": "lats", "display_name": "Lats", "ranking": 1 }, { "muscle_group": "low_back", "display_name": "Low Back", "ranking": 3 }, { "muscle_group": "mid_back", "display_name": "Mid Back", "ranking": 2 } ], "short_video_url": null, "long_video_url": null, "movement_videos": [], "image_url": null, "talkback_description": "Start in a seated position and draw one foot in toward you. Stretch the other leg straight out to the side. Allowing your back to round, fold forward, down the middle between both legs." } ] }, { "id": "2cdc065325e64d8292277295744b775e", "type": "movement", "display_name": "Dragonfly Pose", "scheduled_offset": 720, "offset": 780, "length": 240, "rounds": null, "trackable_movements_disabled": false, "movements": [ { "id": "0bfb6ed7bf90423282c8aad20d20c732", "name": "Dragonfly Pose", "note": null, "slug": null, "skill_level": "beginner", "muscle_groups": [ { "muscle_group": "hamstrings", "display_name": "Hamstrings", "ranking": 3 }, { "muscle_group": "low_back", "display_name": "Low Back", "ranking": 3 }, { "muscle_group": "mid_back", "display_name": "Mid Back", "ranking": 1 }, { "muscle_group": "shoulders", "display_name": "Shoulders", "ranking": 2 } ], "short_video_url": null, "long_video_url": null, "movement_videos": [], "image_url": null, "talkback_description": "From a seated position, spread your legs apart as far as feels comfortable. Sitting on a cushion will help tilt your hips. Fold forward, resting your weight into your hands with your arms locked straight, or rest your elbows onto a block." } ] } ], "is_transition": false }, { "id": "803d002464a6487baf3c2d85876baf53", "length": 180, "start_time_offset": 1020, "icon_url": "https://s3.amazonaws.com/static-cdn.pelotoncycle.com/segment-icons/yoga_savasana.png", "intensity_in_mets": 1, "metrics_type": "floor", "icon_name": "yoga_savasana", "icon_slug": "yoga_savasana", "name": "Savasana", "is_drill": false, "subsegments_v2": [ { "id": "8a58e6de0ec8470a9b2e3563097ce2ec", "type": "movement", "display_name": "Savasana", "scheduled_offset": 960, "offset": 1020, "length": 180, "rounds": null, "trackable_movements_disabled": false, "movements": [ { "id": "3afe1fa871ba45e0b24c858abca3a946", "name": "Savasana", "note": null, "slug": null, "skill_level": "beginner", "muscle_groups": [], "short_video_url": "https://mvmnts-pton.akamaized.net/vod/mvmnts/0f51a7b01a4446829be834e2ef1ab2d2/WEBM/video.webm", "long_video_url": "https://mvmnts-pton.akamaized.net/vod/mvmnts/919d5b1b456242e59497cc1b3b873e72/HLS/master.m3u8", "movement_videos": [ { "id": "919d5b1b456242e59497cc1b3b873e72", "type": "long", "url": "https://mvmnts-pton.akamaized.net/vod/mvmnts/919d5b1b456242e59497cc1b3b873e72/HLS/master.m3u8" }, { "id": "0f51a7b01a4446829be834e2ef1ab2d2", "type": "short", "url": "https://mvmnts-pton.akamaized.net/vod/mvmnts/0f51a7b01a4446829be834e2ef1ab2d2/WEBM/video.webm" } ], "image_url": null, "talkback_description": "Start seated with your legs bent in front of you. Lower yourself down to the ground. Straighten your legs with your feet separated at least hip width. Relax your legs and feet, and allow the toes to naturally open. Rest your arms on the mat with your palms facing upward. Widen your upper back and adjust your head so that the neck is in a comfortable position. Relax and allow the entire body to be heavy. " } ] } ], "is_transition": false } ], "segment_category_distribution": { "Yin": "0.85", "Savasana": "0.15" }, "segment_body_focus_distribution": { "full_body": "1.0" }, "movements_by_weight_category": {} } } ``` details
@philosowaffle philosowaffle added the enhancement new feature / improvments label Feb 28, 2023
@philosowaffle philosowaffle changed the title [Feature] Map Strength and Yoga exercises even for non-Guide workouts [Feature] Map Strength exercises even for non-Guide workouts Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature / improvments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant