Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- 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"
- version: "1.0.0"
- title: "Beep Beep-Statistics"
- termsOfService: "https://github.com/MFranceschi6/BeepBeep-statistics"
- contact:
- email: "daniele.gadler@yahoo.it"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "localhost:5000"
- basePath: "/"
- tags:
- - name: "statistics"
- description: "View graphical statistics of all your Strava runs"
- externalDocs:
- description: "Find out more"
- url: "http://www.strava.com"
- schemes:
- - "http"
- paths:
- /statistics/{userID}:
- get:
- tags:
- - "statistics"
- summary: "Find statistics for a certain user ID"
- 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'."
- operationId: "getStatisticsbyUserID"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "userID"
- in: "path"
- description: "User ID of the user whose statistics you want to return."
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/RunsArray"
- 400:
- description: "Invalid user ID supplied"
- 404:
- description: "User not found for the user ID suppied. "
- security:
- - api_key: []
- /statistics/{userID}/{statisticsID}:
- get:
- tags:
- - "statistics"
- summary: "Find statistics for a certain user ID"
- 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'."
- operationId: "getCertainStatisticsbyUserID"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "userID"
- in: "path"
- description: "User ID of the user whose statistics you want to return."
- required: true
- type: "integer"
- format: "int64"
- - name: "statisticsID"
- in: "path"
- 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."
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/RunsArray"
- 400:
- description: "Invalid user ID or statistics ID supplied"
- 404:
- description: "User not found for the user ID supplied. "
- security:
- - api_key: []
- securityDefinitions:
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- User:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- firstName:
- type: "string"
- lastName:
- type: "string"
- email:
- type: "string"
- password:
- type: "string"
- age:
- type: "integer"
- format: "int64"
- weight:
- type: "number"
- format: "float64"
- max_hr:
- type: "integer"
- format: "int64"
- rest_hr:
- type: "integer"
- format: "int64"
- vo2max:
- type: "number"
- format: "float64"
- xml:
- name: "User"
- RunsArray:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- distance_array:
- type: array
- items:
- type: "integer"
- format: "int64"
- average_speeds_array:
- type: array
- items:
- type: "integer"
- format: "int64"
- average_heart_rates_array:
- type: array
- items:
- type: "integer"
- format: "int64"
- total_elevation_gains_array:
- type: array
- items:
- type: "integer"
- format: "int64"
- elapsed_times_array:
- type: array
- items:
- type: "integer"
- format: "int64"
- xml:
- name: "RunsArray"
- Run:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- xml:
- name: "User"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement