Skip to content

Instantly share code, notes, and snippets.

@houen
Last active August 29, 2015 13:56
Show Gist options
  • Save houen/9118968 to your computer and use it in GitHub Desktop.
Save houen/9118968 to your computer and use it in GitHub Desktop.
How about this as a format for session_plan (written in Pseudo-JSON)
session_plan:
session_plan_exercises:
[
{
number_in_set: int
position: int
station: Station (if locked to one)
exercise: Exercise (no adjustments)
},
{
etc...
}
]
Then, to get the adjustments for that exercise in this session plan for this member, you could call something like:
exercise_adjustments?session_plan_exercise_id=122&member_id=42
And adjustments for all exercises for this session_plan and member:
exercise_adjustments?session_plan_id=122&member_id=42
(I am a little uncertain of the member part here, but since adjustments can be scoped to: session_plan_exercise, session_plan, workout, and member+exercise, I think including it makes the most sense, as then you are sure to get whatever is defined for this member. If you do not want member settings to interfere, for example for configuring a public workout, you can exclude it. Amine and I should discuss this I think, in order to find the best way)
@houen
Copy link
Author

houen commented Feb 21, 2014

session_plans/3545/adjustments

[
adjustment:{
id: ... ,
exercise_id: 4 ,
duration: ...
repetion_goal: ...
set_duration: ...
session_plan_id: 5,
session_plan_exercise_id: 13,
},
adjustment:{
id: ... ,
exercise_id: 42 ,
duration: ...
repetion_goal: ...
set_duration: ...
session_plan_id: 5,
session_plan_exercise_id: 14,
},
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment