Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "This is a statistics web server for the Beep Beep application for retrieving statistics about your runs in a visual graphical format. For more information, visit the Github repository: https://github.com/MFranceschi6/BeepBeep-statistics"
  4. version: "1.0.0"
  5. title: "Beep Beep-Statistics"
  6. termsOfService: "https://github.com/MFranceschi6/BeepBeep-statistics"
  7. contact:
  8. email: "daniele.gadler@yahoo.it"
  9. license:
  10. name: "Apache 2.0"
  11. url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. host: "localhost:5000"
  13. basePath: "/"
  14. tags:
  15. - name: "statistics"
  16. description: "View graphical statistics of all your Strava runs"
  17. externalDocs:
  18. description: "Find out more"
  19. url: "http://www.strava.com"
  20. schemes:
  21. - "http"
  22. paths:
  23. /statistics/{userID}:
  24. get:
  25. tags:
  26. - "statistics"
  27. summary: "Find statistics for a certain user ID"
  28. description: "By accessing this page and providing an existing user ID, you retrieve a set of 5 arrays, respectively the temporal statistics of your runs for the following attributes, respectively: 'distance', 'average speed', 'average heartrate'. 'total elevation gain', 'elapsed time'."
  29. operationId: "getStatisticsbyUserID"
  30. produces:
  31. - "application/xml"
  32. - "application/json"
  33. parameters:
  34. - name: "userID"
  35. in: "path"
  36. description: "User ID of the user whose statistics you want to return."
  37. required: true
  38. type: "integer"
  39. format: "int64"
  40. responses:
  41. 200:
  42. description: "successful operation"
  43. schema:
  44. $ref: "#/definitions/RunsArray"
  45. 400:
  46. description: "Invalid user ID supplied"
  47. 404:
  48. description: "User not found for the user ID suppied. "
  49. security:
  50. - api_key: []
  51. /statistics/{userID}/{statisticsID}:
  52. get:
  53. tags:
  54. - "statistics"
  55. summary: "Find statistics for a certain user ID"
  56. description: "By accessing this page and providing an existing user ID, you retrieve a set of 5 arrays, respectively the temporal statistics of your runs for the following attributes, respectively: 'distance', 'average speed', 'average heartrate'. 'total elevation gain', 'elapsed time'."
  57. operationId: "getCertainStatisticsbyUserID"
  58. produces:
  59. - "application/xml"
  60. - "application/json"
  61. parameters:
  62. - name: "userID"
  63. in: "path"
  64. description: "User ID of the user whose statistics you want to return."
  65. required: true
  66. type: "integer"
  67. format: "int64"
  68. - name: "statisticsID"
  69. in: "path"
  70. description: "Statistics ID of the statistics type you want to return. 1 = distance; 2 = average speed; 3 = average heartrate; 4 = total elevation gain; 5 = elapsed time."
  71. required: true
  72. type: "integer"
  73. format: "int64"
  74. responses:
  75. 200:
  76. description: "successful operation"
  77. schema:
  78. $ref: "#/definitions/RunsArray"
  79. 400:
  80. description: "Invalid user ID or statistics ID supplied"
  81. 404:
  82. description: "User not found for the user ID supplied. "
  83. security:
  84. - api_key: []
  85. securityDefinitions:
  86. api_key:
  87. type: "apiKey"
  88. name: "api_key"
  89. in: "header"
  90. definitions:
  91. User:
  92. type: "object"
  93. properties:
  94. id:
  95. type: "integer"
  96. format: "int64"
  97. firstName:
  98. type: "string"
  99. lastName:
  100. type: "string"
  101. email:
  102. type: "string"
  103. password:
  104. type: "string"
  105. age:
  106. type: "integer"
  107. format: "int64"
  108. weight:
  109. type: "number"
  110. format: "float64"
  111. max_hr:
  112. type: "integer"
  113. format: "int64"
  114. rest_hr:
  115. type: "integer"
  116. format: "int64"
  117. vo2max:
  118. type: "number"
  119. format: "float64"
  120. xml:
  121. name: "User"
  122.  
  123.  
  124. RunsArray:
  125. type: "object"
  126. properties:
  127. id:
  128. type: "integer"
  129. format: "int64"
  130. distance_array:
  131. type: array
  132. items:
  133. type: "integer"
  134. format: "int64"
  135. average_speeds_array:
  136. type: array
  137. items:
  138. type: "integer"
  139. format: "int64"
  140. average_heart_rates_array:
  141. type: array
  142. items:
  143. type: "integer"
  144. format: "int64"
  145. total_elevation_gains_array:
  146. type: array
  147. items:
  148. type: "integer"
  149. format: "int64"
  150. elapsed_times_array:
  151. type: array
  152. items:
  153. type: "integer"
  154. format: "int64"
  155. xml:
  156. name: "RunsArray"
  157. Run:
  158. type: "object"
  159. properties:
  160. id:
  161. type: "integer"
  162. format: "int64"
  163. xml:
  164. name: "User"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement