API Design
- Log a workout
- System should capture the user workout details.
- HTTP POST: /api/v1/workout
- Request Body: {
"workouttype":"".
"workoutmetadata":{}
}
d. Response: {status:"", message:""}
- Get the workout history
- User can get the workout details by workout type, for a date and time
- HTTP GET: /api/v1/workout/{workout-type}/{startdatetime}/{enddatetime}
- Response: {workouttype:"", metadata:{}}
- Workout stats
- User can get the statistics of the specific workout
- HTTP GET: /api/v1/workout/{workout-type}
- Response: {workouttype:"", stateFor="Daily/Weekly/Monthly" metadata:[{date:"", caloriesburnt:"",highhartbeats:"", lowhartbeats:""}]}
- Synch the workout details with backend
- The workout data will be store at the local storage for a specific interval or when the user is offline. once user is online of after a specific interval user data will be synch to the backend system
- HTTP POST: /api/v1/workout/synch
- Request Body: {
"workouttype":"".
"workoutmetadata":{}
}
- d. Response: {status:"", message:""}