| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- window.data = [
- {
- type: "object",
- title: "User",
- id: "user",
- auth: false,
- description: "User object",
- properties: [
- {
- name: "id",
- type: "String",
- desc: "Unique user ID"
- },
- {
- name: "name",
- type: "String",
- desc: "User name"
- },
- {
- name: "email",
- type: "String",
- desc: "User email address"
- }
- ]
- },
- {
- type: "route",
- id: "createUser",
- title: "Create",
- url: "POST /user",
- auth: false,
- description: "Create a new user",
- requestBody: [
- {
- name: "name",
- type: "String",
- desc: "User name"
- },
- {
- name: "email",
- type: "String",
- desc: "User email address"
- },
- {
- name: "pass",
- type: "String",
- desc: "User password"
- },
- {
- name: "confirmPass",
- type: "String",
- desc: "Confirmation password"
- }
- ],
- responseBody: [{
- name: "success",
- type: "true",
- desc: "Always '{success: true} if no error'"
- }]
- },
- {
- type: "route",
- id: "loginUser",
- title: "Log In",
- url: "PUT /user/login",
- auth: false,
- description: "Log the user in",
- requestBody: [
- {
- name: "email",
- type: "String",
- desc: "User email address"
- },
- {
- name: "pass",
- type: "String",
- desc: "User password"
- }
- ],
- responseBody: [{
- name: "N/A",
- type: "User",
- desc: "User object"
- }]
- },
- {
- type: "route",
- id: "logoutUser",
- title: "Log Out",
- url: "GET /user/logout",
- auth: false,
- description: "Log the user out of this device",
- responseBody: [{
- name: "success",
- type: "true",
- desc: "Always {success: true} if no error"
- }]
- },
- {
- type: "object",
- title: "Workout",
- id: "workout",
- auth: false,
- description: "A workout plan that the user creates",
- properties: [
- {
- name: "id",
- type: "String",
- desc: "Unique ID of the workout"
- },
- {
- name: "exercises",
- type: "[Object]",
- desc: "A list of all exercises for this workout. Contains a name and an enum 'type'"
- },
- {
- name: "exercises.id",
- type: "String",
- desc: "Unique ID of the exercise"
- },
- {
- name: "exercises.name",
- type: "String",
- desc: "User given name of the exercise"
- },
- {
- name: "exercises.type",
- type: "String",
- desc: "Enum describing what type of exercise it is",
- options: ["weights"]
- }
- ]
- },
- {
- type: "route",
- id: "createWorkout",
- title: "Create",
- url: "POST /workout",
- auth: true,
- description: "Create a new workout for a user",
- requestBody: [
- {
- name: "name",
- type: "String",
- desc: "Name of the workout"
- },
- {
- name: "exercises",
- type: "[Object]",
- desc: "List of all exercises for the workout. Contains a name and an enum 'type'"
- },
- {
- name: "exercises.name",
- type: "String",
- desc: "Name of the exercise"
- },
- {
- name: "exercises.type",
- type: "String",
- desc: "Enum describing what type of exercise it is",
- options: ["weights"]
- }
- ],
- responseBody: [{
- name: "N/A",
- type: "Workout",
- desc: "Workout object"
- }]
- },
- {
- type: "route",
- id: "getWorkouts",
- title: "Get",
- url: "GET /workout",
- auth: true,
- description: "Retrieve all of the workouts for logged in user",
- responseBody: [{
- name: "N/A",
- type: "[Workout]",
- desc: "List of workouts for the logged in user"
- }]
- }
- ]
|