| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- 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: "workouts",
- type: [Object],
- desc: "List of workouts. Includes name of the workout and list of exercises"
- },
- {
- name: "workouts.name",
- type: "String",
- desc: "Name of the workout"
- },
- {
- name: "workouts.exercises",
- type: "[String]",
- desc: "List of strings, each one being the name of an exercise"
- }
- ]
- },
- {
- 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"
- }]
- }
- ]
|