PRO Personalized Workouts
PRO Personalized Workouts · GPT-Aktionen
Build Interactive Training
Builds saves the workout you created on the MYO app so the user can do it, edit it in a more interactive manner.
POST /gptCreateTrainingCreateTrainingCreates the training you just built in the MYO app to make it interactive.
POST /gptSearchExercisesSearchExercisesSearch available exercises to create the training.
POST /gptSaveDataSaveDataSaves the training generated data in s category. Returns an ID to access that data later.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "Build Interactive Training",
"description": "Builds saves the workout you created on the MYO app so the user can do it, edit it in a more interactive manner.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://api.myoxyn.com"
}
],
"paths": {
"/gptCreateTraining": {
"post": {
"description": "Creates the training you just built in the MYO app to make it interactive.",
"operationId": "CreateTraining",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTrainingRequestSchema"
}
}
},
"required": true
},
"deprecated": false
}
},
"/gptSearchExercises": {
"post": {
"description": "Search available exercises to create the training.",
"operationId": "SearchExercises",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchExercisesRequestSchema"
}
}
},
"required": true
},
"deprecated": false
}
},
"/gptSaveData": {
"post": {
"description": "Saves the training generated data in s category. Returns an ID to access that data later.",
"operationId": "SaveData",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SaveCategoryDataRequestSchema"
}
}
},
"required": true
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"CreateTrainingRequestSchema": {
"properties": {
"name": {
"type": "string",
"title": "Training Name",
"description": "Catchy training name."
},
"desc": {
"type": "string",
"title": "Description",
"description": "A fully comprehensible description of the training."
},
"image": {
"type": "string",
"title": "Image",
"description": "Send the user specified image URL"
},
"multi_week": {
"type": "string",
"title": "Multi-week training",
"enum": [
"false"
],
"description": "Its not a multi-week training plan."
},
"difficulty": {
"type": "number",
"title": "Difficulty of the training",
"enum": [
0,
1,
2,
3
],
"description": "0 = beginner; 1 = intermediate; 2 = advanced; 3 = elite."
},
"metric": {
"type": "string",
"title": "Weight Metric",
"enum": [
"kg",
"lbs"
],
"description": "Weight metric the training is based. Can only be: 'kg' for kilograms and 'lbs' for pounds."
},
"saveIDs": {
"type": "array",
"items": {
"type": "string",
"title": "Training Data Saved IDs",
"description": "List with the IDS of the previously saved data of each category"
}
}
},
"type": "object",
"required": [
"name",
"desc",
"image",
"multi_week",
"difficulty",
"metric",
"saveIDs"
],
"title": "CreateTrainingRequestSchema"
},
"SaveCategoryDataRequestSchema": {
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"title": "Training Data",
"description": "List with all the data of the training.",
"properties": {
"exerciseID": {
"type": "string",
"title": "ID of the exercise",
"description": "ID of the exercise this entry belongs to."
},
"grip": {
"type": "number",
"title": "Grip of the exercise",
"description": "Default value is 0."
},
"progression": {
"type": "number",
"title": "Progression of the exercise",
"description": "Default value is 0."
},
"subId": {
"type": "number",
"title": "Complementary ID for duplicated exercises.",
"description": "Default value is 0."
},
"timer": {
"type": "string",
"title": "Exercise Timer",
"enum": [
"true",
"false"
],
"description": "Only to mark in dynamic exercises to use a timer instead of counting the reps."
},
"sets": {
"type": "number",
"title": "Sets",
"description": "Sets of the exercise. Has to be greater or equal to 1."
},
"restSet": {
"type": "number",
"title": "Rest after each set.",
"description": "The rest after each set measured in seconds. Has to be greater or equal to 1."
},
"restExercise": {
"type": "number",
"title": "Rest after finishing this exercise.",
"description": "The rest after this exercise measured in seconds. Has to be greater or equal to 1."
},
"reps": {
"type": "number",
"title": "Reps",
"description": "Reps the exercise is going to have each set."
},
"weight": {
"type": "number",
"title": "Weight",
"description": "Weight of the exercise. If none, set it to 0"
}
},
"required": [
"exerciseID",
"sets",
"restSet",
"restExercise",
"reps"
]
}
},
"days": {
"type": "array",
"items": {
"type": "number",
"title": "Day",
"enum": [
0
],
"description": "Only 0 is valid"
}
}
},
"type": "object",
"required": [
"data",
"days"
],
"title": "SaveCategoryDataRequestSchema"
},
"SearchExercisesRequestSchema": {
"properties": {
"query": {
"type": "string",
"title": "Query",
"description": "Query to search exercises by semantic search."
},
"category": {
"type": "number",
"enum": [
0,
1,
2,
3,
4,
5
],
"title": "Category of the exercises to search",
"description": "0 = Push; 1 = Pull; 2 = Leg; 3 = Core; 4 = Mobility; 5 = Cardio. ONLY ONE per request."
},
"amount": {
"type": "number",
"title": "Exercises Amount",
"description": "Amount of exercises you want to retrieve for the selected category."
},
"type": {
"type": "string",
"title": "Exercises Type",
"enum": [
"Gym",
"Bodyweight",
"Any"
],
"description": "Set it to Any if the user does NOT Clearly specify it on his request. Default it to Any. If you are not sure mark Any"
},
"skill": {
"type": "number",
"title": "Bodyweight Skill",
"enum": [
0,
1,
2,
3
],
"description": "0 = No skill, 1 = Planche, 2 = Front Lever, 3 = Handstand. Set it to 0 NO SKILL unless the user request specifies a skill. Default it to 0. If you are not sure mark 0."
}
},
"type": "object",
"required": [
"query",
"category",
"amount",
"type",
"skill"
],
"title": "SearchExercisesRequestSchema"
}
}
}
}