{ "config": { // All clients listen here permanently "articleBaseUrl": "http://cloud-storage.com/articles/" }, "users": { "user_id_01": { // Clients listen here permanently "username": "user", "email": "user@somewhere.com", "fitnessLevel": 10, "fitnessBias": 1, "created": 987654345, // Unix timestamp (seconds) "maxImpactCredit": 3, "impactCredit": 0.9, "updatedIC": 987654345, // Unix timestamp (seconds) "triggersFired": ["triggerId_01","triggerId_02"] } }, "visibleWorkoutDefs": { // Workout defs that are visible to the user "user_id_01": { "visibleIn7MW": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "wktdef1": { "recommended": "", // Not recommended, just visible "locked": true, // Not available to user (unlocked via IAP and/or journey trigger) "lockString": "Finish 6 more workouts before Thurs 9th June", // Displayed to user "MWI": 0.54, "breakdown": { "epoc": 0.1, "cardio": 0.1, "metabolic": 0.1, "strength": 0.1 } }, "wktdef2": { "recommended": "You need to work on your abs", // Recommended and reason for this to be shown to user "locked": false, // Available to user "lockString": "", "MWI": 0.54, "breakdown": { "epoc": 0.1, "cardio": 0.1, "metabolic": 0.1, "strength": 0.1 } } }, "visibleInAfterburner": { // Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "wktdef1": { "recommended": "", // Not recommended, just visible "locked": false, // Available to user "lockString": "", "MWI": 0.54, "breakdown": { "epoc": 0.1, "cardio": 0.1, "metabolic": 0.1, "strength": 0.1 } }, "wktdef2": { "recommended": "You need to work on your abs", // Recommended and reason for this to be shown to user "locked": false, // Available to user "lockString": "", "MWI": 0.54, "breakdown": { "epoc": 0.1, "cardio": 0.1, "metabolic": 0.1, "strength": 0.1 } } } } }, "workouts": { "activities": { "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "workout_id_01": { // Clients post new activity to here with auto id, server listens "workoutDefId": "wktdef1", "finish": 987654345, // Unix timestamp (seconds) "exertion": 0.5, "finalHeartRateBPM": 160, "finalHeartRateDelay": 0 // Length of delay (in secs) after the workout before the HR was measured (0 if they didn't press the 'start again' button) } } }, "results": { "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "workout_id_01": { // Server posts workout results here "workoutDefId": "wktdef1", "finish": 987654345, // Unix timestamp (seconds) "AWI": 0.1, "responseDuration": 3456, "intensity": 0.9, "responses": { "cardio": { "stress": 43, "magnitudeProduct": 0.6, "halflifeProduct": 0.3, "duration": 5678, "volume": 3456 }, "strength": { "stress": 43, "magnitudeProduct": 0.6, "halflifeProduct": 0.3, "duration": 5678, "volume": 3456 }, "epoc": { "stress": 43, "magnitudeProduct": 0.6, "halflifeProduct": 0.3, "duration": 5678, "volume": 3456 }, "metabolic": { "stress": 43, "magnitudeProduct": 0.6, "halflifeProduct": 0.3, "duration": 5678, "volume": 3456 } }, "muscleGroups": { "upper": 0.3, "lower": 0.3, "core": 0.4 } } } } }, "afterburn": { "user_id_01": { // Clients listen here permanently "start": 345678987, // Unix timestamp (seconds) "response": { "resolution": 600, // Secs "epoc": [0.6,0.5,0.3,0.2,0.1,0.0], "cardio": [0.6,0.5,0.3,0.2,0.1,0.0], "strength": [0.6,0.5,0.3,0.2,0.1,0.0], "metabolic": [0.6,0.5,0.3,0.2,0.1,0.0] }, "impactCredit": { "resolution": 600, // Secs "futureCredit": 0.9, "pending": [0.0,0.1,0.2,0.3,0.4,0.5] }, "messages": [ // Messages displayed below the radar chart {"t":0,"body":"Restoring body temperature", "detail": ""}, {"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"} ], "notifications": [ {"t":6000,"body":"Great workout! You're still burning calories and building strength."}, {"t":14400,"body":"Fitness test unlocked! You're ready to take another fitness test."} ] } }, "timelineArticles": { "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "article_id_01": { "date": 4567890987, // Unix timestamp (seconds) "title": "Post title", "read": false, "location": "post/location.html", "icon": "default", "appMask": "7MW,AF" } } }, "journeyTriggers: { "forAfterburner": { "trigger01": { "category": "achievement", "triggerType": "activeDaysInPeriod", "condition1": 7, // 7 activities "condition2": 7, // in 7 days "appMask": "7MW,AF", "actions": [ {"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}, {"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""} ] }, "trigger02": { "category": "education", "triggerType": "totalActivities", "condition1": 10, // 10 activities "condition2": 0, // Not used "appMask": "7MW,AF", "actions": [ {"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"} ] } }, "for7MW": { "trigger01": { "category": "achievement", "triggerType": "activeDaysInPeriod", "condition1": 7, // 7 activities "condition2": 7, // in 7 days "appMask": "7MW,AF", "actions": [ {"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}, {"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""} ] }, "trigger02": { "category": "education", "triggerType": "totalActivities", "condition1": 10, // 10 activities "condition2": 0, // Not used "appMask": "7MW,AF", "actions": [ {"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"} ] } } }, "definitions": { "version": 1, "exerciseDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "exdef1": { "behaviour": 1, "title": "Cruches", "video": "01-Crunches.mp4", "image": "abs", "desc": "A crunch begins with lying face up on the floor with knees bent. The movement begins by curling the shoulders towards the pelvis. The hands can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands.", "subtitle": "Target your abs for a balanced set of stomach muscles.", "calPerSec": 5, "skill": 0.2, "strength": 0.7, "cardio": 0.1, "epoc": 0.4, "metabolic": 0.4, "upper": 0.5, "core": 0.5, "lower": 0.5 }, "exdef2": { "behaviour": 1, "title": "Squats", "video": "02-Squats.mp4", "image": "abs", "desc": "Squats are an excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks.", "subtitle": "Train your lower body and core.", "calPerSec": 4, "skill": 0.2, "strength": 0.6, "cardio": 0.3, "epoc": 0.4, "metabolic": 0.6, "upper": 0.5, "core": 0.5, "lower": 0.5 } }, "workoutDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "wktdef1": { "type": 1, "title": "Aerobic", "image": "abs", "desc": "Aerobic Basic Movement", "breakDuration": 5, "appStoreId: "workout01", // StoreKit product id "in7MW": true, // For server use "inAfterburner": false, // For server use "exercises": [ { "id": "exdef1", "duration": 20 }, { "id": "exdef2", "duration": 15 }, { "id": "exdef3", "duration": 10 }, { "id": "exdef4", "duration": 5 }, { "id": "exdef5", "duration": 10 } ], "adaptiveStress": { "strength": 0.2, "cardio": 0.9, "metabolic": 0.6, "epoc": 0.6 }, "muscleStress": { "upper": 10, "lower": 10, "core": 10 } }, "wktdef2": { "type": 1, "title": "Thai Boxing", "image": "abs", "desc": "Boxing With Kicking", "breakDuration": 4, "appStoreId: "", // StoreKit product id "in7MW": false, // For server use "inAfterburner": true, // For server use "exercises": [ { "id": "exdef5", "duration": 15 }, { "id": "exdef3", "duration": 10 }, { "id": "exdef1", "duration": 5 } ], "stress": { "strength": 0.2, "cardio": 0.9, "metabolic": 0.6, "epoc": 0.6 }, "muscleStress": { "upper": 10, "lower": 10, "core": 10 } } } } }
General
Content
Integrations