@nativesquare/soma 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/client/index.d.ts +96 -33
  2. package/dist/client/index.d.ts.map +1 -1
  3. package/dist/client/index.js +80 -35
  4. package/dist/client/index.js.map +1 -1
  5. package/dist/component/_generated/api.d.ts +18 -0
  6. package/dist/component/_generated/api.d.ts.map +1 -1
  7. package/dist/component/_generated/api.js.map +1 -1
  8. package/dist/component/_generated/component.d.ts +43 -9
  9. package/dist/component/_generated/component.d.ts.map +1 -1
  10. package/dist/component/garmin/auth.d.ts +0 -4
  11. package/dist/component/garmin/auth.d.ts.map +1 -1
  12. package/dist/component/garmin/auth.js +0 -8
  13. package/dist/component/garmin/auth.js.map +1 -1
  14. package/dist/component/garmin/private.d.ts +20 -3
  15. package/dist/component/garmin/private.d.ts.map +1 -1
  16. package/dist/component/garmin/private.js +17 -26
  17. package/dist/component/garmin/private.js.map +1 -1
  18. package/dist/component/garmin/public.d.ts +4 -4
  19. package/dist/component/garmin/public.d.ts.map +1 -1
  20. package/dist/component/garmin/public.js +6 -1
  21. package/dist/component/garmin/public.js.map +1 -1
  22. package/dist/component/garmin/webhooks.d.ts +4 -0
  23. package/dist/component/garmin/webhooks.d.ts.map +1 -1
  24. package/dist/component/garmin/webhooks.js +23 -18
  25. package/dist/component/garmin/webhooks.js.map +1 -1
  26. package/dist/component/schema.d.ts +2 -2
  27. package/dist/component/schema.d.ts.map +1 -1
  28. package/dist/component/schema.js +5 -3
  29. package/dist/component/schema.js.map +1 -1
  30. package/dist/{strava → component/strava}/auth.d.ts +15 -48
  31. package/dist/component/strava/auth.d.ts.map +1 -0
  32. package/dist/{strava → component/strava}/auth.js +4 -39
  33. package/dist/component/strava/auth.js.map +1 -0
  34. package/dist/component/strava/client.d.ts +8 -0
  35. package/dist/component/strava/client.d.ts.map +1 -0
  36. package/dist/component/strava/client.js +18 -0
  37. package/dist/component/strava/client.js.map +1 -0
  38. package/dist/component/strava/private.d.ts +19 -0
  39. package/dist/component/strava/private.d.ts.map +1 -1
  40. package/dist/component/strava/private.js +52 -2
  41. package/dist/component/strava/private.js.map +1 -1
  42. package/dist/component/strava/public.d.ts +87 -12
  43. package/dist/component/strava/public.d.ts.map +1 -1
  44. package/dist/component/strava/public.js +218 -92
  45. package/dist/component/strava/public.js.map +1 -1
  46. package/dist/component/strava/transform/activity.d.ts +19 -0
  47. package/dist/component/strava/transform/activity.d.ts.map +1 -0
  48. package/dist/{strava → component/strava/transform}/activity.js +21 -41
  49. package/dist/component/strava/transform/activity.js.map +1 -0
  50. package/dist/{strava → component/strava/transform}/athlete.d.ts +4 -10
  51. package/dist/component/strava/transform/athlete.d.ts.map +1 -0
  52. package/dist/{strava → component/strava/transform}/athlete.js +2 -8
  53. package/dist/component/strava/transform/athlete.js.map +1 -0
  54. package/dist/component/strava/transform/maps/sportType.d.ts +7 -0
  55. package/dist/component/strava/transform/maps/sportType.d.ts.map +1 -0
  56. package/dist/{strava/maps/sport-type.js → component/strava/transform/maps/sportType.js} +4 -2
  57. package/dist/component/strava/transform/maps/sportType.js.map +1 -0
  58. package/dist/component/strava/types/stravaApi/client/client.gen.d.ts +3 -0
  59. package/dist/component/strava/types/stravaApi/client/client.gen.d.ts.map +1 -0
  60. package/dist/component/strava/types/stravaApi/client/client.gen.js +236 -0
  61. package/dist/component/strava/types/stravaApi/client/client.gen.js.map +1 -0
  62. package/dist/component/strava/types/stravaApi/client/index.d.ts +9 -0
  63. package/dist/component/strava/types/stravaApi/client/index.d.ts.map +1 -0
  64. package/dist/component/strava/types/stravaApi/client/index.js +7 -0
  65. package/dist/component/strava/types/stravaApi/client/index.js.map +1 -0
  66. package/dist/component/strava/types/stravaApi/client/types.gen.d.ts +118 -0
  67. package/dist/component/strava/types/stravaApi/client/types.gen.d.ts.map +1 -0
  68. package/dist/component/strava/types/stravaApi/client/types.gen.js +3 -0
  69. package/dist/component/strava/types/stravaApi/client/types.gen.js.map +1 -0
  70. package/dist/component/strava/types/stravaApi/client/utils.gen.d.ts +34 -0
  71. package/dist/component/strava/types/stravaApi/client/utils.gen.d.ts.map +1 -0
  72. package/dist/component/strava/types/stravaApi/client/utils.gen.js +229 -0
  73. package/dist/component/strava/types/stravaApi/client/utils.gen.js.map +1 -0
  74. package/dist/component/strava/types/stravaApi/client.gen.d.ts +13 -0
  75. package/dist/component/strava/types/stravaApi/client.gen.d.ts.map +1 -0
  76. package/dist/component/strava/types/stravaApi/client.gen.js +4 -0
  77. package/dist/component/strava/types/stravaApi/client.gen.js.map +1 -0
  78. package/dist/component/strava/types/stravaApi/core/auth.gen.d.ts +19 -0
  79. package/dist/component/strava/types/stravaApi/core/auth.gen.d.ts.map +1 -0
  80. package/dist/component/strava/types/stravaApi/core/auth.gen.js +15 -0
  81. package/dist/component/strava/types/stravaApi/core/auth.gen.js.map +1 -0
  82. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.d.ts +26 -0
  83. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.d.ts.map +1 -0
  84. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.js +58 -0
  85. package/dist/component/strava/types/stravaApi/core/bodySerializer.gen.js.map +1 -0
  86. package/dist/component/strava/types/stravaApi/core/params.gen.d.ts +44 -0
  87. package/dist/component/strava/types/stravaApi/core/params.gen.d.ts.map +1 -0
  88. package/dist/component/strava/types/stravaApi/core/params.gen.js +101 -0
  89. package/dist/component/strava/types/stravaApi/core/params.gen.js.map +1 -0
  90. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.d.ts +34 -0
  91. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.d.ts.map +1 -0
  92. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.js +107 -0
  93. package/dist/component/strava/types/stravaApi/core/pathSerializer.gen.js.map +1 -0
  94. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.d.ts +19 -0
  95. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.d.ts.map +1 -0
  96. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.js +93 -0
  97. package/dist/component/strava/types/stravaApi/core/queryKeySerializer.gen.js.map +1 -0
  98. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.d.ts +72 -0
  99. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.d.ts.map +1 -0
  100. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.js +134 -0
  101. package/dist/component/strava/types/stravaApi/core/serverSentEvents.gen.js.map +1 -0
  102. package/dist/component/strava/types/stravaApi/core/types.gen.d.ts +79 -0
  103. package/dist/component/strava/types/stravaApi/core/types.gen.d.ts.map +1 -0
  104. package/dist/component/strava/types/stravaApi/core/types.gen.js +3 -0
  105. package/dist/component/strava/types/stravaApi/core/types.gen.js.map +1 -0
  106. package/dist/component/strava/types/stravaApi/core/utils.gen.d.ts +20 -0
  107. package/dist/component/strava/types/stravaApi/core/utils.gen.d.ts.map +1 -0
  108. package/dist/component/strava/types/stravaApi/core/utils.gen.js +88 -0
  109. package/dist/component/strava/types/stravaApi/core/utils.gen.js.map +1 -0
  110. package/dist/component/strava/types/stravaApi/index.d.ts +3 -0
  111. package/dist/component/strava/types/stravaApi/index.d.ts.map +1 -0
  112. package/dist/component/strava/types/stravaApi/index.js +3 -0
  113. package/dist/component/strava/types/stravaApi/index.js.map +1 -0
  114. package/dist/component/strava/types/stravaApi/sdk.gen.d.ts +224 -0
  115. package/dist/component/strava/types/stravaApi/sdk.gen.d.ts.map +1 -0
  116. package/dist/component/strava/types/stravaApi/sdk.gen.js +361 -0
  117. package/dist/component/strava/types/stravaApi/sdk.gen.js.map +1 -0
  118. package/dist/component/strava/types/stravaApi/types.gen.d.ts +2209 -0
  119. package/dist/component/strava/types/stravaApi/types.gen.d.ts.map +1 -0
  120. package/dist/component/strava/types/stravaApi/types.gen.js +3 -0
  121. package/dist/component/strava/types/stravaApi/types.gen.js.map +1 -0
  122. package/dist/component/strava/types/stravaApi/zod.gen.d.ts +5332 -0
  123. package/dist/component/strava/types/stravaApi/zod.gen.d.ts.map +1 -0
  124. package/dist/component/strava/types/stravaApi/zod.gen.js +1009 -0
  125. package/dist/component/strava/types/stravaApi/zod.gen.js.map +1 -0
  126. package/dist/component/strava/utils.d.ts +15 -0
  127. package/dist/component/strava/utils.d.ts.map +1 -0
  128. package/dist/component/strava/utils.js +36 -0
  129. package/dist/component/strava/utils.js.map +1 -0
  130. package/dist/component/utils.d.ts +5 -0
  131. package/dist/component/utils.d.ts.map +1 -0
  132. package/dist/component/utils.js +11 -0
  133. package/dist/component/utils.js.map +1 -0
  134. package/package.json +131 -130
  135. package/src/client/index.ts +121 -52
  136. package/src/component/_generated/api.ts +18 -0
  137. package/src/component/_generated/component.ts +44 -11
  138. package/src/component/garmin/auth.ts +0 -9
  139. package/src/component/garmin/private.ts +0 -12
  140. package/src/component/garmin/public.ts +8 -1
  141. package/src/component/schema.ts +5 -3
  142. package/src/{strava → component/strava}/auth.ts +143 -185
  143. package/src/component/strava/client.ts +20 -0
  144. package/src/component/strava/private.ts +147 -89
  145. package/src/component/strava/public.ts +268 -110
  146. package/src/{strava → component/strava/transform}/activity.ts +256 -276
  147. package/src/{strava → component/strava/transform}/athlete.ts +41 -47
  148. package/src/{strava/maps/sport-type.ts → component/strava/transform/maps/sportType.ts} +100 -99
  149. package/src/component/strava/types/specs/strava-api.json +4796 -0
  150. package/src/component/strava/types/stravaApi/client/client.gen.ts +290 -0
  151. package/src/component/strava/types/stravaApi/client/index.ts +25 -0
  152. package/src/component/strava/types/stravaApi/client/types.gen.ts +214 -0
  153. package/src/component/strava/types/stravaApi/client/utils.gen.ts +316 -0
  154. package/src/component/strava/types/stravaApi/client.gen.ts +16 -0
  155. package/src/component/strava/types/stravaApi/core/auth.gen.ts +41 -0
  156. package/src/component/strava/types/stravaApi/core/bodySerializer.gen.ts +82 -0
  157. package/src/component/strava/types/stravaApi/core/params.gen.ts +169 -0
  158. package/src/component/strava/types/stravaApi/core/pathSerializer.gen.ts +171 -0
  159. package/src/component/strava/types/stravaApi/core/queryKeySerializer.gen.ts +117 -0
  160. package/src/component/strava/types/stravaApi/core/serverSentEvents.gen.ts +243 -0
  161. package/src/component/strava/types/stravaApi/core/types.gen.ts +104 -0
  162. package/src/component/strava/types/stravaApi/core/utils.gen.ts +140 -0
  163. package/src/component/strava/types/stravaApi/index.ts +4 -0
  164. package/src/component/strava/types/stravaApi/sdk.gen.ts +410 -0
  165. package/src/component/strava/types/stravaApi/types.gen.ts +2435 -0
  166. package/src/component/strava/types/stravaApi/zod.gen.ts +1132 -0
  167. package/src/component/strava/utils.ts +52 -0
  168. package/src/component/utils.ts +11 -0
  169. package/dist/strava/activity.d.ts +0 -121
  170. package/dist/strava/activity.d.ts.map +0 -1
  171. package/dist/strava/activity.js.map +0 -1
  172. package/dist/strava/athlete.d.ts.map +0 -1
  173. package/dist/strava/athlete.js.map +0 -1
  174. package/dist/strava/auth.d.ts.map +0 -1
  175. package/dist/strava/auth.js.map +0 -1
  176. package/dist/strava/client.d.ts +0 -93
  177. package/dist/strava/client.d.ts.map +0 -1
  178. package/dist/strava/client.js +0 -158
  179. package/dist/strava/client.js.map +0 -1
  180. package/dist/strava/index.d.ts +0 -13
  181. package/dist/strava/index.d.ts.map +0 -1
  182. package/dist/strava/index.js +0 -17
  183. package/dist/strava/index.js.map +0 -1
  184. package/dist/strava/maps/sport-type.d.ts +0 -7
  185. package/dist/strava/maps/sport-type.d.ts.map +0 -1
  186. package/dist/strava/maps/sport-type.js.map +0 -1
  187. package/dist/strava/sync.d.ts +0 -104
  188. package/dist/strava/sync.d.ts.map +0 -1
  189. package/dist/strava/sync.js +0 -87
  190. package/dist/strava/sync.js.map +0 -1
  191. package/dist/strava/types.d.ts +0 -266
  192. package/dist/strava/types.d.ts.map +0 -1
  193. package/dist/strava/types.js +0 -8
  194. package/dist/strava/types.js.map +0 -1
  195. package/src/strava/activity.test.ts +0 -415
  196. package/src/strava/athlete.test.ts +0 -139
  197. package/src/strava/auth.test.ts +0 -78
  198. package/src/strava/client.ts +0 -212
  199. package/src/strava/index.ts +0 -54
  200. package/src/strava/maps/sport-type.test.ts +0 -69
  201. package/src/strava/sync.ts +0 -168
  202. package/src/strava/types.ts +0 -361
@@ -0,0 +1,4796 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "title": "Strava API v3",
5
+ "description": "The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.",
6
+ "version": "3.0.0"
7
+ },
8
+ "host": "www.strava.com",
9
+ "basePath": "/api/v3",
10
+ "schemes": [
11
+ "https"
12
+ ],
13
+ "produces": [
14
+ "application/json"
15
+ ],
16
+ "security": [
17
+ {
18
+ "strava_oauth": [
19
+ "public"
20
+ ]
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/athletes/{id}/stats": {
25
+ "get": {
26
+ "operationId": "getStats",
27
+ "summary": "Get Athlete Stats",
28
+ "description": "Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.",
29
+ "parameters": [
30
+ {
31
+ "name": "id",
32
+ "in": "path",
33
+ "description": "The identifier of the athlete. Must match the authenticated athlete.",
34
+ "required": true,
35
+ "type": "integer",
36
+ "format": "int64"
37
+ }
38
+ ],
39
+ "tags": [
40
+ "Athletes"
41
+ ],
42
+ "responses": {
43
+ "200": {
44
+ "description": "Activity stats of the athlete.",
45
+ "schema": {
46
+ "$ref": "#/definitions/ActivityStats"
47
+ }
48
+ },
49
+ "default": {
50
+ "description": "Unexpected error.",
51
+ "schema": {
52
+ "$ref": "#/definitions/Fault"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "/athlete": {
59
+ "get": {
60
+ "operationId": "getLoggedInAthlete",
61
+ "summary": "Get Authenticated Athlete",
62
+ "description": "Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.",
63
+ "tags": [
64
+ "Athletes"
65
+ ],
66
+ "responses": {
67
+ "200": {
68
+ "description": "Profile information for the authenticated athlete.",
69
+ "schema": {
70
+ "$ref": "#/definitions/DetailedAthlete"
71
+ },
72
+ "examples": {
73
+ "application/json": {
74
+ "id": 1234567890987654400,
75
+ "username": "marianne_t",
76
+ "resource_state": 3,
77
+ "firstname": "Marianne",
78
+ "lastname": "Teutenberg",
79
+ "city": "San Francisco",
80
+ "state": "CA",
81
+ "country": "US",
82
+ "sex": "F",
83
+ "premium": true,
84
+ "created_at": "2017-11-14T02:30:05Z",
85
+ "updated_at": "2018-02-06T19:32:20Z",
86
+ "badge_type_id": 4,
87
+ "profile_medium": "https://xxxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/medium.jpg",
88
+ "profile": "https://xxxxx.cloudfront.net/pictures/athletes/123456789/123456789/2/large.jpg",
89
+ "friend": null,
90
+ "follower": null,
91
+ "follower_count": 5,
92
+ "friend_count": 5,
93
+ "mutual_friend_count": 0,
94
+ "athlete_type": 1,
95
+ "date_preference": "%m/%d/%Y",
96
+ "measurement_preference": "feet",
97
+ "clubs": [],
98
+ "ftp": null,
99
+ "weight": 0,
100
+ "bikes": [
101
+ {
102
+ "id": "b12345678987655",
103
+ "primary": true,
104
+ "name": "EMC",
105
+ "resource_state": 2,
106
+ "distance": 0
107
+ }
108
+ ],
109
+ "shoes": [
110
+ {
111
+ "id": "g12345678987655",
112
+ "primary": true,
113
+ "name": "adidas",
114
+ "resource_state": 2,
115
+ "distance": 4904
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ },
121
+ "default": {
122
+ "description": "Unexpected error.",
123
+ "schema": {
124
+ "$ref": "#/definitions/Fault"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "put": {
130
+ "operationId": "updateLoggedInAthlete",
131
+ "summary": "Update Athlete",
132
+ "description": "Update the currently authenticated athlete. Requires profile:write scope.",
133
+ "consumes": [
134
+ "multipart/form-data"
135
+ ],
136
+ "tags": [
137
+ "Athletes"
138
+ ],
139
+ "parameters": [
140
+ {
141
+ "name": "weight",
142
+ "in": "path",
143
+ "description": "The weight of the athlete in kilograms.",
144
+ "required": true,
145
+ "type": "number",
146
+ "format": "float"
147
+ }
148
+ ],
149
+ "responses": {
150
+ "200": {
151
+ "description": "Profile information for the authenticated athlete.",
152
+ "schema": {
153
+ "$ref": "#/definitions/DetailedAthlete"
154
+ },
155
+ "examples": {
156
+ "application/json": {
157
+ "id": 1.2345678987655098e+22,
158
+ "username": "marianne_v",
159
+ "resource_state": 3,
160
+ "firstname": "Marianne",
161
+ "lastname": "V.",
162
+ "city": "San Francisco",
163
+ "state": "CA",
164
+ "country": "US",
165
+ "sex": "F",
166
+ "premium": true,
167
+ "created_at": "2017-11-14T02:30:05Z",
168
+ "updated_at": "2018-02-06T19:32:20Z",
169
+ "badge_type_id": 4,
170
+ "profile_medium": "https://xxxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/medium.jpg",
171
+ "profile": "https://xxxxx.cloudfront.net/pictures/athletes/1234567898765509876/1234567898765509876/2/large.jpg",
172
+ "friend": null,
173
+ "follower": null,
174
+ "follower_count": 5,
175
+ "friend_count": 5,
176
+ "mutual_friend_count": 0,
177
+ "athlete_type": 1,
178
+ "date_preference": "%m/%d/%Y",
179
+ "measurement_preference": "feet",
180
+ "clubs": [],
181
+ "ftp": null,
182
+ "weight": 0,
183
+ "bikes": [
184
+ {
185
+ "id": "b1234567898765509876",
186
+ "primary": true,
187
+ "name": "EMC",
188
+ "resource_state": 2,
189
+ "distance": 0
190
+ }
191
+ ],
192
+ "shoes": [
193
+ {
194
+ "id": "g1234567898765509876",
195
+ "primary": true,
196
+ "name": "adidas",
197
+ "resource_state": 2,
198
+ "distance": 4904
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ "default": {
205
+ "description": "Unexpected error.",
206
+ "schema": {
207
+ "$ref": "#/definitions/Fault"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "/athlete/zones": {
214
+ "get": {
215
+ "operationId": "getLoggedInAthleteZones",
216
+ "summary": "Get Zones",
217
+ "description": "Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.",
218
+ "tags": [
219
+ "Athletes"
220
+ ],
221
+ "responses": {
222
+ "200": {
223
+ "description": "Heart rate and power zones.",
224
+ "schema": {
225
+ "$ref": "#/definitions/Zones"
226
+ },
227
+ "examples": {
228
+ "application/json": [
229
+ {
230
+ "distribution_buckets": [
231
+ {
232
+ "max": 0,
233
+ "min": 0,
234
+ "time": 1498
235
+ },
236
+ {
237
+ "max": 50,
238
+ "min": 0,
239
+ "time": 62
240
+ },
241
+ {
242
+ "max": 100,
243
+ "min": 50,
244
+ "time": 169
245
+ },
246
+ {
247
+ "max": 150,
248
+ "min": 100,
249
+ "time": 536
250
+ },
251
+ {
252
+ "max": 200,
253
+ "min": 150,
254
+ "time": 672
255
+ },
256
+ {
257
+ "max": 250,
258
+ "min": 200,
259
+ "time": 821
260
+ },
261
+ {
262
+ "max": 300,
263
+ "min": 250,
264
+ "time": 529
265
+ },
266
+ {
267
+ "max": 350,
268
+ "min": 300,
269
+ "time": 251
270
+ },
271
+ {
272
+ "max": 400,
273
+ "min": 350,
274
+ "time": 80
275
+ },
276
+ {
277
+ "max": 450,
278
+ "min": 400,
279
+ "time": 81
280
+ },
281
+ {
282
+ "max": -1,
283
+ "min": 450,
284
+ "time": 343
285
+ }
286
+ ],
287
+ "type": "power",
288
+ "resource_state": 3,
289
+ "sensor_based": true
290
+ }
291
+ ]
292
+ }
293
+ },
294
+ "default": {
295
+ "description": "Unexpected error.",
296
+ "schema": {
297
+ "$ref": "#/definitions/Fault"
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "/segments/{id}": {
304
+ "get": {
305
+ "operationId": "getSegmentById",
306
+ "summary": "Get Segment",
307
+ "description": "Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.",
308
+ "parameters": [
309
+ {
310
+ "name": "id",
311
+ "in": "path",
312
+ "description": "The identifier of the segment.",
313
+ "required": true,
314
+ "type": "integer",
315
+ "format": "int64"
316
+ }
317
+ ],
318
+ "tags": [
319
+ "Segments"
320
+ ],
321
+ "responses": {
322
+ "200": {
323
+ "description": "Representation of a segment.",
324
+ "schema": {
325
+ "$ref": "#/definitions/DetailedSegment"
326
+ },
327
+ "examples": {
328
+ "application/json": {
329
+ "id": 229781,
330
+ "resource_state": 3,
331
+ "name": "Hawk Hill",
332
+ "activity_type": "Ride",
333
+ "distance": 2684.82,
334
+ "average_grade": 5.7,
335
+ "maximum_grade": 14.2,
336
+ "elevation_high": 245.3,
337
+ "elevation_low": 92.4,
338
+ "start_latlng": [
339
+ 37.8331119,
340
+ -122.4834356
341
+ ],
342
+ "end_latlng": [
343
+ 37.8280722,
344
+ -122.4981393
345
+ ],
346
+ "climb_category": 1,
347
+ "city": "San Francisco",
348
+ "state": "CA",
349
+ "country": "United States",
350
+ "private": false,
351
+ "hazardous": false,
352
+ "starred": false,
353
+ "created_at": "2009-09-21T20:29:41Z",
354
+ "updated_at": "2018-02-15T09:04:18Z",
355
+ "total_elevation_gain": 155.733,
356
+ "map": {
357
+ "id": "s229781",
358
+ "polyline": "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
359
+ "resource_state": 3
360
+ },
361
+ "effort_count": 309974,
362
+ "athlete_count": 30623,
363
+ "star_count": 2428,
364
+ "athlete_segment_stats": {
365
+ "pr_elapsed_time": 553,
366
+ "pr_date": "1993-04-03",
367
+ "effort_count": 2
368
+ }
369
+ }
370
+ }
371
+ },
372
+ "default": {
373
+ "description": "Unexpected error.",
374
+ "schema": {
375
+ "$ref": "#/definitions/Fault"
376
+ }
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "/segments/starred": {
382
+ "get": {
383
+ "operationId": "getLoggedInAthleteStarredSegments",
384
+ "summary": "List Starred Segments",
385
+ "description": "List of the authenticated athlete's starred segments. Private segments are filtered out unless requested by a token with read_all scope.",
386
+ "parameters": [
387
+ {
388
+ "$ref": "#/parameters/page"
389
+ },
390
+ {
391
+ "$ref": "#/parameters/perPage"
392
+ }
393
+ ],
394
+ "tags": [
395
+ "Segments"
396
+ ],
397
+ "responses": {
398
+ "200": {
399
+ "description": "List of the authenticated athlete's starred segments.",
400
+ "schema": {
401
+ "type": "array",
402
+ "items": {
403
+ "$ref": "#/definitions/SummarySegment"
404
+ }
405
+ },
406
+ "examples": {
407
+ "application/json": {
408
+ "id": 229781,
409
+ "resource_state": 3,
410
+ "name": "Hawk Hill",
411
+ "activity_type": "Ride",
412
+ "distance": 2684.82,
413
+ "average_grade": 5.7,
414
+ "maximum_grade": 14.2,
415
+ "elevation_high": 245.3,
416
+ "elevation_low": 92.4,
417
+ "start_latlng": [
418
+ 37.8331119,
419
+ -122.4834356
420
+ ],
421
+ "end_latlng": [
422
+ 37.8280722,
423
+ -122.4981393
424
+ ],
425
+ "climb_category": 1,
426
+ "city": "San Francisco",
427
+ "state": "CA",
428
+ "country": "United States",
429
+ "private": false,
430
+ "hazardous": false,
431
+ "starred": false,
432
+ "created_at": "2009-09-21T20:29:41Z",
433
+ "updated_at": "2018-02-15T09:04:18Z",
434
+ "total_elevation_gain": 155.733,
435
+ "map": {
436
+ "id": "s229781",
437
+ "polyline": "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
438
+ "resource_state": 3
439
+ },
440
+ "effort_count": 309974,
441
+ "athlete_count": 30623,
442
+ "star_count": 2428,
443
+ "athlete_segment_stats": {
444
+ "pr_elapsed_time": 553,
445
+ "pr_date": "1993-04-03",
446
+ "effort_count": 2
447
+ }
448
+ }
449
+ }
450
+ },
451
+ "default": {
452
+ "description": "Unexpected error.",
453
+ "schema": {
454
+ "$ref": "#/definitions/Fault"
455
+ }
456
+ }
457
+ }
458
+ }
459
+ },
460
+ "/segments/{id}/starred": {
461
+ "put": {
462
+ "operationId": "starSegment",
463
+ "summary": "Star Segment",
464
+ "description": "Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.",
465
+ "parameters": [
466
+ {
467
+ "name": "id",
468
+ "in": "path",
469
+ "description": "The identifier of the segment to star.",
470
+ "required": true,
471
+ "type": "integer",
472
+ "format": "int64"
473
+ },
474
+ {
475
+ "name": "starred",
476
+ "in": "formData",
477
+ "description": "If true, star the segment; if false, unstar the segment.",
478
+ "type": "boolean",
479
+ "required": true,
480
+ "default": false
481
+ }
482
+ ],
483
+ "tags": [
484
+ "Segments"
485
+ ],
486
+ "responses": {
487
+ "200": {
488
+ "description": "Representation of a segment.",
489
+ "schema": {
490
+ "$ref": "#/definitions/DetailedSegment"
491
+ },
492
+ "examples": {
493
+ "application/json": {
494
+ "id": 229781,
495
+ "resource_state": 3,
496
+ "name": "Hawk Hill",
497
+ "activity_type": "Ride",
498
+ "distance": 2684.82,
499
+ "average_grade": 5.7,
500
+ "maximum_grade": 14.2,
501
+ "elevation_high": 245.3,
502
+ "elevation_low": 92.4,
503
+ "start_latlng": [
504
+ 37.8331119,
505
+ -122.4834356
506
+ ],
507
+ "end_latlng": [
508
+ 37.8280722,
509
+ -122.4981393
510
+ ],
511
+ "climb_category": 1,
512
+ "city": "San Francisco",
513
+ "state": "CA",
514
+ "country": "United States",
515
+ "private": false,
516
+ "hazardous": false,
517
+ "starred": false,
518
+ "created_at": "2009-09-21T20:29:41Z",
519
+ "updated_at": "2018-02-15T09:04:18Z",
520
+ "total_elevation_gain": 155.733,
521
+ "map": {
522
+ "id": "s229781",
523
+ "polyline": "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
524
+ "resource_state": 3
525
+ },
526
+ "effort_count": 309974,
527
+ "athlete_count": 30623,
528
+ "star_count": 2428,
529
+ "athlete_segment_stats": {
530
+ "pr_elapsed_time": 553,
531
+ "pr_date": "1993-04-03",
532
+ "effort_count": 2
533
+ }
534
+ }
535
+ }
536
+ },
537
+ "default": {
538
+ "description": "Unexpected error.",
539
+ "schema": {
540
+ "$ref": "#/definitions/Fault"
541
+ }
542
+ }
543
+ }
544
+ }
545
+ },
546
+ "/segment_efforts": {
547
+ "get": {
548
+ "operationId": "getEffortsBySegmentId",
549
+ "summary": "List Segment Efforts",
550
+ "description": "Returns a set of the authenticated athlete's segment efforts for a given segment. Requires subscription.",
551
+ "parameters": [
552
+ {
553
+ "name": "segment_id",
554
+ "in": "query",
555
+ "description": "The identifier of the segment.",
556
+ "required": true,
557
+ "type": "integer"
558
+ },
559
+ {
560
+ "name": "start_date_local",
561
+ "in": "query",
562
+ "description": "ISO 8601 formatted date time.",
563
+ "type": "string",
564
+ "format": "date-time"
565
+ },
566
+ {
567
+ "name": "end_date_local",
568
+ "in": "query",
569
+ "description": "ISO 8601 formatted date time.",
570
+ "type": "string",
571
+ "format": "date-time"
572
+ },
573
+ {
574
+ "$ref": "#/parameters/perPage",
575
+ "in": "query"
576
+ }
577
+ ],
578
+ "tags": [
579
+ "SegmentEfforts"
580
+ ],
581
+ "responses": {
582
+ "200": {
583
+ "description": "List of segment efforts.",
584
+ "schema": {
585
+ "type": "array",
586
+ "items": {
587
+ "$ref": "#/definitions/DetailedSegmentEffort"
588
+ }
589
+ },
590
+ "examples": {
591
+ "application/json": [
592
+ {
593
+ "id": 123456789,
594
+ "resource_state": 2,
595
+ "name": "Alpe d'Huez",
596
+ "activity": {
597
+ "id": 1234567890,
598
+ "resource_state": 1
599
+ },
600
+ "athlete": {
601
+ "id": 123445678689,
602
+ "resource_state": 1
603
+ },
604
+ "elapsed_time": 1657,
605
+ "moving_time": 1642,
606
+ "start_date": "2007-09-15T08:15:29Z",
607
+ "start_date_local": "2007-09-15T09:15:29Z",
608
+ "distance": 6148.92,
609
+ "start_index": 1102,
610
+ "end_index": 1366,
611
+ "device_watts": false,
612
+ "average_watts": 220.2,
613
+ "segment": {
614
+ "id": 788127,
615
+ "resource_state": 2,
616
+ "name": "Alpe d'Huez",
617
+ "activity_type": "Ride",
618
+ "distance": 6297.46,
619
+ "average_grade": 4.8,
620
+ "maximum_grade": 16.3,
621
+ "elevation_high": 416,
622
+ "elevation_low": 104.6,
623
+ "start_latlng": [
624
+ 52.98501000581467,
625
+ -3.1869720001197366
626
+ ],
627
+ "end_latlng": [
628
+ 53.02204074375785,
629
+ -3.2039630001245736
630
+ ],
631
+ "climb_category": 2,
632
+ "city": "Le Bourg D'Oisans",
633
+ "state": "RA",
634
+ "country": "France",
635
+ "private": false,
636
+ "hazardous": false,
637
+ "starred": false
638
+ },
639
+ "kom_rank": null,
640
+ "pr_rank": null,
641
+ "achievements": []
642
+ }
643
+ ]
644
+ }
645
+ },
646
+ "default": {
647
+ "description": "Unexpected error.",
648
+ "schema": {
649
+ "$ref": "#/definitions/Fault"
650
+ }
651
+ }
652
+ }
653
+ }
654
+ },
655
+ "/segments/explore": {
656
+ "get": {
657
+ "operationId": "exploreSegments",
658
+ "summary": "Explore segments",
659
+ "description": "Returns the top 10 segments matching a specified query.",
660
+ "parameters": [
661
+ {
662
+ "name": "bounds",
663
+ "in": "query",
664
+ "description": "The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]",
665
+ "required": true,
666
+ "type": "array",
667
+ "items": {
668
+ "type": "number",
669
+ "format": "float"
670
+ },
671
+ "collectionFormat": "csv",
672
+ "minItems": 4,
673
+ "maxItems": 4
674
+ },
675
+ {
676
+ "name": "activity_type",
677
+ "in": "query",
678
+ "description": "Desired activity type.",
679
+ "type": "string",
680
+ "enum": [
681
+ "running",
682
+ "riding"
683
+ ]
684
+ },
685
+ {
686
+ "name": "min_cat",
687
+ "in": "query",
688
+ "description": "The minimum climbing category.",
689
+ "type": "integer",
690
+ "minimum": 0,
691
+ "maximum": 5
692
+ },
693
+ {
694
+ "name": "max_cat",
695
+ "in": "query",
696
+ "description": "The maximum climbing category.",
697
+ "type": "integer",
698
+ "minimum": 0,
699
+ "maximum": 5
700
+ }
701
+ ],
702
+ "tags": [
703
+ "Segments"
704
+ ],
705
+ "responses": {
706
+ "200": {
707
+ "description": "List of matching segments.",
708
+ "schema": {
709
+ "$ref": "#/definitions/ExplorerResponse"
710
+ },
711
+ "examples": {
712
+ "application/json": {
713
+ "segments": [
714
+ {
715
+ "id": 229781,
716
+ "resource_state": 2,
717
+ "name": "Hawk Hill",
718
+ "climb_category": 1,
719
+ "climb_category_desc": "4",
720
+ "avg_grade": 5.7,
721
+ "start_latlng": [
722
+ 37.8331119,
723
+ -122.4834356
724
+ ],
725
+ "end_latlng": [
726
+ 37.8280722,
727
+ -122.4981393
728
+ ],
729
+ "elev_difference": 152.8,
730
+ "distance": 2684.8,
731
+ "points": "}g|eFnpqjVl@En@Md@HbAd@d@^h@Xx@VbARjBDh@OPQf@w@d@k@XKXDFPH\\EbGT`AV`@v@|@NTNb@?XOb@cAxAWLuE@eAFMBoAv@eBt@q@b@}@tAeAt@i@dAC`AFZj@dB?~@[h@MbAVn@b@b@\\d@Eh@Qb@_@d@eB|@c@h@WfBK|AMpA?VF\\\\t@f@t@h@j@|@b@hCb@b@XTd@Bl@GtA?jAL`ALp@Tr@RXd@Rx@Pn@^Zh@Tx@Zf@`@FTCzDy@f@Yx@m@n@Op@VJr@",
732
+ "starred": false
733
+ }
734
+ ]
735
+ }
736
+ }
737
+ },
738
+ "default": {
739
+ "description": "Unexpected error.",
740
+ "schema": {
741
+ "$ref": "#/definitions/Fault"
742
+ }
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "/segment_efforts/{id}": {
748
+ "get": {
749
+ "operationId": "getSegmentEffortById",
750
+ "summary": "Get Segment Effort",
751
+ "description": "Returns a segment effort from an activity that is owned by the authenticated athlete. Requires subscription.",
752
+ "parameters": [
753
+ {
754
+ "name": "id",
755
+ "in": "path",
756
+ "description": "The identifier of the segment effort.",
757
+ "required": true,
758
+ "type": "integer",
759
+ "format": "int64"
760
+ }
761
+ ],
762
+ "tags": [
763
+ "SegmentEfforts"
764
+ ],
765
+ "responses": {
766
+ "200": {
767
+ "description": "Representation of a segment effort.",
768
+ "schema": {
769
+ "$ref": "#/definitions/DetailedSegmentEffort"
770
+ },
771
+ "examples": {
772
+ "application/json": {
773
+ "id": 1234556789,
774
+ "resource_state": 3,
775
+ "name": "Alpe d'Huez",
776
+ "activity": {
777
+ "id": 3454504,
778
+ "resource_state": 1
779
+ },
780
+ "athlete": {
781
+ "id": 54321,
782
+ "resource_state": 1
783
+ },
784
+ "elapsed_time": 381,
785
+ "moving_time": 340,
786
+ "start_date": "2018-02-12T16:12:41Z",
787
+ "start_date_local": "2018-02-12T08:12:41Z",
788
+ "distance": 83,
789
+ "start_index": 65,
790
+ "end_index": 83,
791
+ "segment": {
792
+ "id": 63450,
793
+ "resource_state": 2,
794
+ "name": "Alpe d'Huez",
795
+ "activity_type": "Run",
796
+ "distance": 780.35,
797
+ "average_grade": -0.5,
798
+ "maximum_grade": 0,
799
+ "elevation_high": 21,
800
+ "elevation_low": 17.2,
801
+ "start_latlng": [
802
+ 37.808407654682,
803
+ -122.426682919323
804
+ ],
805
+ "end_latlng": [
806
+ 37.808297909724,
807
+ -122.421324329674
808
+ ],
809
+ "climb_category": 0,
810
+ "city": "San Francisco",
811
+ "state": "CA",
812
+ "country": "United States",
813
+ "private": false,
814
+ "hazardous": false,
815
+ "starred": false
816
+ },
817
+ "kom_rank": null,
818
+ "pr_rank": null,
819
+ "achievements": [],
820
+ "athlete_segment_stats": {
821
+ "pr_elapsed_time": 212,
822
+ "pr_date": "2015-02-12",
823
+ "effort_count": 149
824
+ }
825
+ }
826
+ }
827
+ },
828
+ "default": {
829
+ "description": "Unexpected error.",
830
+ "schema": {
831
+ "$ref": "#/definitions/Fault"
832
+ }
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "/activities": {
838
+ "post": {
839
+ "operationId": "createActivity",
840
+ "summary": "Create an Activity",
841
+ "description": "Creates a manual activity for an athlete, requires activity:write scope.",
842
+ "parameters": [
843
+ {
844
+ "name": "name",
845
+ "in": "formData",
846
+ "description": "The name of the activity.",
847
+ "required": true,
848
+ "type": "string"
849
+ },
850
+ {
851
+ "name": "type",
852
+ "in": "formData",
853
+ "description": "Type of activity. For example - Run, Ride etc.",
854
+ "type": "string",
855
+ "required": false
856
+ },
857
+ {
858
+ "name": "sport_type",
859
+ "in": "formData",
860
+ "description": "Sport type of activity. For example - Run, MountainBikeRide, Ride, etc.",
861
+ "type": "string",
862
+ "required": true
863
+ },
864
+ {
865
+ "name": "start_date_local",
866
+ "in": "formData",
867
+ "description": "ISO 8601 formatted date time.",
868
+ "type": "string",
869
+ "format": "date-time",
870
+ "required": true
871
+ },
872
+ {
873
+ "name": "elapsed_time",
874
+ "in": "formData",
875
+ "description": "In seconds.",
876
+ "type": "integer",
877
+ "required": true
878
+ },
879
+ {
880
+ "name": "description",
881
+ "in": "formData",
882
+ "description": "Description of the activity.",
883
+ "type": "string",
884
+ "required": false
885
+ },
886
+ {
887
+ "name": "distance",
888
+ "in": "formData",
889
+ "description": "In meters.",
890
+ "type": "number",
891
+ "format": "float",
892
+ "required": false
893
+ },
894
+ {
895
+ "name": "trainer",
896
+ "in": "formData",
897
+ "description": "Set to 1 to mark as a trainer activity.",
898
+ "type": "integer",
899
+ "required": false
900
+ },
901
+ {
902
+ "name": "commute",
903
+ "in": "formData",
904
+ "description": "Set to 1 to mark as commute.",
905
+ "type": "integer",
906
+ "required": false
907
+ }
908
+ ],
909
+ "tags": [
910
+ "Activities"
911
+ ],
912
+ "responses": {
913
+ "201": {
914
+ "description": "The activity's detailed representation.",
915
+ "schema": {
916
+ "$ref": "#/definitions/DetailedActivity"
917
+ },
918
+ "examples": {
919
+ "application/json": {
920
+ "id": 123456778928065,
921
+ "resource_state": 3,
922
+ "external_id": null,
923
+ "upload_id": null,
924
+ "athlete": {
925
+ "id": 12343545645788,
926
+ "resource_state": 1
927
+ },
928
+ "name": "Chill Day",
929
+ "distance": 0,
930
+ "moving_time": 18373,
931
+ "elapsed_time": 18373,
932
+ "total_elevation_gain": 0,
933
+ "type": "Ride",
934
+ "sport_type": "MountainBikeRide",
935
+ "start_date": "2018-02-20T18:02:13Z",
936
+ "start_date_local": "2018-02-20T10:02:13Z",
937
+ "timezone": "(GMT-08:00) America/Los_Angeles",
938
+ "utc_offset": -28800,
939
+ "achievement_count": 0,
940
+ "kudos_count": 0,
941
+ "comment_count": 0,
942
+ "athlete_count": 1,
943
+ "photo_count": 0,
944
+ "map": {
945
+ "id": "a12345678908766",
946
+ "polyline": null,
947
+ "resource_state": 3
948
+ },
949
+ "trainer": false,
950
+ "commute": false,
951
+ "manual": true,
952
+ "private": false,
953
+ "flagged": false,
954
+ "gear_id": "b453542543",
955
+ "from_accepted_tag": null,
956
+ "average_speed": 0,
957
+ "max_speed": 0,
958
+ "device_watts": false,
959
+ "has_heartrate": false,
960
+ "pr_count": 0,
961
+ "total_photo_count": 0,
962
+ "has_kudoed": false,
963
+ "workout_type": null,
964
+ "description": null,
965
+ "calories": 0,
966
+ "segment_efforts": []
967
+ }
968
+ }
969
+ },
970
+ "default": {
971
+ "description": "Unexpected error.",
972
+ "schema": {
973
+ "$ref": "#/definitions/Fault"
974
+ }
975
+ }
976
+ }
977
+ }
978
+ },
979
+ "/activities/{id}": {
980
+ "get": {
981
+ "operationId": "getActivityById",
982
+ "summary": "Get Activity",
983
+ "description": "Returns the given activity that is owned by the authenticated athlete. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.\n\nWe strongly encourage you to display the appropriate attribution that identifies Garmin as the data source and the device name in your application. Please see example below from VeloViewer (that provides an attribution for a Garmin Forerunner device).\n\n![Attribution](/images/device-attribution-image.png)",
984
+ "parameters": [
985
+ {
986
+ "name": "id",
987
+ "in": "path",
988
+ "description": "The identifier of the activity.",
989
+ "required": true,
990
+ "type": "integer",
991
+ "format": "int64"
992
+ },
993
+ {
994
+ "name": "include_all_efforts",
995
+ "in": "query",
996
+ "description": "To include all segments efforts.",
997
+ "type": "boolean"
998
+ }
999
+ ],
1000
+ "tags": [
1001
+ "Activities"
1002
+ ],
1003
+ "responses": {
1004
+ "200": {
1005
+ "description": "The activity's detailed representation.",
1006
+ "schema": {
1007
+ "$ref": "#/definitions/DetailedActivity"
1008
+ },
1009
+ "examples": {
1010
+ "application/json": {
1011
+ "id": 12345678987654320,
1012
+ "resource_state": 3,
1013
+ "external_id": "garmin_push_12345678987654321",
1014
+ "upload_id": 98765432123456780,
1015
+ "athlete": {
1016
+ "id": 134815,
1017
+ "resource_state": 1
1018
+ },
1019
+ "name": "Happy Friday",
1020
+ "distance": 28099,
1021
+ "moving_time": 4207,
1022
+ "elapsed_time": 4410,
1023
+ "total_elevation_gain": 516,
1024
+ "type": "Ride",
1025
+ "sport_type": "MountainBikeRide",
1026
+ "start_date": "2018-02-16T14:52:54Z",
1027
+ "start_date_local": "2018-02-16T06:52:54Z",
1028
+ "timezone": "(GMT-08:00) America/Los_Angeles",
1029
+ "utc_offset": -28800,
1030
+ "start_latlng": [
1031
+ 37.83,
1032
+ -122.26
1033
+ ],
1034
+ "end_latlng": [
1035
+ 37.83,
1036
+ -122.26
1037
+ ],
1038
+ "achievement_count": 0,
1039
+ "kudos_count": 19,
1040
+ "comment_count": 0,
1041
+ "athlete_count": 1,
1042
+ "photo_count": 0,
1043
+ "map": {
1044
+ "id": "a1410355832",
1045
+ "polyline": "ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@_AdBcD`@iAPq@RgALqAB{@EqAyAoOCy@AmCBmANqBLqAZkB\\iCPiBJwCCsASiCq@iD]eA]y@[i@w@mAa@i@k@g@kAw@i@Ya@Q]EWFMLa@~BYpAFNpA`Aj@n@X`@V`AHh@JfB@xAMvAGZGHIDIAWOEQNcC@sACYK[MSOMe@QKKKYOs@UYQISCQ?Q@WNo@r@OHGAGCKOQ_BU}@MQGG]Io@@c@FYNg@d@s@d@ODQAMOMaASs@_@a@SESAQDqBn@a@RO?KK?UBU\\kA@Y?WMo@Iy@GWQ_@WSSGg@AkABQB_Ap@_A^o@b@Q@o@IS@OHi@n@OFS?OI}@iAQMQGQC}@DOIIUK{@IUOMyBo@kASOKIQCa@L[|AgATWN[He@?QKw@FOPCh@Fx@l@TDLELKl@aAHIJEX@r@ZTDV@LENQVg@RkA@c@MeA?WFOPMf@Ej@Fj@@LGHKDM?_@_@iC?a@HKRIl@NT?FCHMFW?YEYGWQa@GYBiAIq@Gq@L_BHSHK|@WJETSLQZs@z@_A~@uA^U`@G\\CRB\\Tl@p@Th@JZ^bB`@lAHLXVLDP?LGFSKiDBo@d@wBVi@R]VYVE\\@`@Lh@Fh@CzAk@RSDQA]GYe@eAGWSiBAWBWBIJORK`@KPOPSTg@h@}Ad@o@F[E_@EGMKUGmAEYGMIMYKs@?a@J}@@_BD_@HQJMx@e@LKHKHWAo@UoAAWFmAH}@?w@C[YwAAc@HSNM|Ao@rA}@zAq@`@a@j@eAxAuBXQj@MXSR[b@gAFg@?YISOGaAHi@Xw@v@_@d@WRSFqARUHQJc@d@m@`A[VSFUBcAEU@WFULUPa@v@Y~@UrBc@dBI~@?l@P~ABt@N`HEjA]zAEp@@p@TrBCl@CTQb@k@dAg@jAU^KJYLK@k@A[Js@d@a@b@]RgBl@[FMAw@[]G]?m@D_@F]P[Vu@t@[TMF_@Do@E_@@q@P]PWZUZw@vAkAlAGJOj@IlAMd@OR{@p@a@d@sBpD]v@a@`Aa@n@]TODgBVk@Pe@^cBfBc@Rs@La@RSPm@|@wCpDS^Wp@QZML{@l@qBbCYd@k@lAIVCZBZNTr@`@RRHZANIZQPKDW@e@CaASU?I@YTKRQx@@\\VmALYRQLCL?v@P|@D\\GJEFKDM@OCa@COOYIGm@YMUCM@]JYr@uAx@kAt@}@jAeAPWbAkBj@s@bAiAz@oAj@m@VQlAc@VQ~@aA`Au@p@Q`AIv@MZORUV_@p@iB|AoCh@q@dAaANUNWH[N{AJ[^m@t@_Av@wA\\a@`@W`@In@Al@B^E`@Wl@u@\\[VQ\\K`@Eb@?R@dAZP@d@CRExAs@\\Yt@{@LG\\MjAATINOXo@d@kAl@_AHYBOCe@QiBCm@Fq@\\wADo@AyGEeBWuB@YHu@Tu@Lk@VcCTo@d@aA\\WJE`@G~@FP?VI\\U~@sANO`@SfAMj@U\\WjAsAXS`@UNENALBHFFL?^Ml@Uj@]b@q@RUJSPkChEc@XcAb@sA|@]PaA\\OJKNER?TDTNj@Jn@?p@OfC@ZR`B@VCV_@n@{@l@WbACv@OlABnAPl@LNNHbBBNBLFFJ@^GLg@x@i@|AMP[X}@XOJKPET?l@LhAFXp@fBDRCd@S\\_@Ps@PQ@}A]S?QDe@V]b@MR[fAKt@ErAF~CANILYDKGIKe@{@Yy@e@sB[gA[c@e@YUCU?WBUHUNQPq@`AiArAMV[^e@Zc@JQJKNMz@?r@Bb@PfAAfA@VVbADn@E`@KHSEe@SMAKDKFM\\^dDCh@m@LoAQ_@@MFOZLfBEl@QbASd@KLQBOAaAc@QAQ@QHc@v@ONMJOBOCg@c@]O[EMBKFGL?RHv@ARERGNe@h@{@h@WVGNDt@JLNFPFz@LdBf@f@PJNHPF`ADPJJJDl@I`@B^Tp@bALJNDNALIf@i@PGPCt@DNE`@Uv@[dAw@RITGRCtAARBPJLPJRZxB?VEX_@vAAR?RDNHJJBh@UnBm@h@IRDRJNNJPNbBFRJLLBLCzAmAd@Uf@Gf@?P@PFJNHPFTH`BDTHNJJJ@LG`@m@^YPER@RDPHNNJRLn@HRLN^VNPHTFX@\\UlDFb@FHh@NP@HKPsB?}ASkCQ{@[y@q@}@cA{@KOCQDa@t@{CFGJCf@Nl@ZtA~@r@p@`@h@rAxBd@rA\\fARdAPjANrB?f@AtBCd@QfBkAjJOlBChA?rBFrBNlBdAfKFzAC~@Iz@Mz@Sv@s@jBmAxBi@hAWt@Sv@Qx@O`BA`@?dAPfBVpAd@`BfBlFf@fBdA~Cr@pAz@fApBhBjAt@H?IL?FBFJLx@^lHvDvh@~XnElCbAd@pGhDbAb@nAr@`Ad@`GhDnBbAxCbBrWhNJJDPARGP_@t@Qh@]pAUtAoA`Ny@jJApBBNFLJFJBv@Hb@HBF?\\",
1046
+ "resource_state": 3,
1047
+ "summary_polyline": "ki{eFvqfiVsBmA`Feh@qg@iX`B}JeCcCqGjIq~@kf@cM{KeHeX`@_GdGkSeBiXtB}YuEkPwFyDeAzAe@pC~DfGc@bIOsGmCcEiD~@oBuEkFhBcBmDiEfAVuDiAuD}NnDaNiIlCyDD_CtJKv@wGhD]YyEzBo@g@uKxGmHpCGtEtI~AuLrHkAcAaIvEgH_EaDR_FpBuBg@sNxHqEtHgLoTpIiCzKNr[sB|Es\\`JyObYeMbGsMnPsAfDxAnD}DBu@bCx@{BbEEyAoD`AmChNoQzMoGhOwX|[yIzBeFKg[zAkIdU_LiHxK}HzEh@vM_BtBg@xGzDbCcF~GhArHaIfByAhLsDiJuC?_HbHd@nL_Cz@ZnEkDDy@hHwJLiCbIrNrIvN_EfAjDWlEnEiAfBxDlFkBfBtEfDaAzBvDKdFx@|@XgJmDsHhAgD`GfElEzOwBnYdBxXgGlSc@bGdHpW|HdJztBnhAgFxc@HnCvBdA"
1048
+ },
1049
+ "trainer": false,
1050
+ "commute": false,
1051
+ "manual": false,
1052
+ "private": false,
1053
+ "flagged": false,
1054
+ "gear_id": "b12345678987654321",
1055
+ "from_accepted_tag": false,
1056
+ "average_speed": 6.679,
1057
+ "max_speed": 18.5,
1058
+ "average_cadence": 78.5,
1059
+ "average_temp": 4,
1060
+ "average_watts": 185.5,
1061
+ "weighted_average_watts": 230,
1062
+ "kilojoules": 780.5,
1063
+ "device_watts": true,
1064
+ "has_heartrate": false,
1065
+ "max_watts": 743,
1066
+ "elev_high": 446.6,
1067
+ "elev_low": 17.2,
1068
+ "pr_count": 0,
1069
+ "total_photo_count": 2,
1070
+ "has_kudoed": false,
1071
+ "workout_type": 10,
1072
+ "suffer_score": null,
1073
+ "description": "",
1074
+ "calories": 870.2,
1075
+ "segment_efforts": [
1076
+ {
1077
+ "id": 12345678987654320,
1078
+ "resource_state": 2,
1079
+ "name": "Tunnel Rd.",
1080
+ "activity": {
1081
+ "id": 12345678987654320,
1082
+ "resource_state": 1
1083
+ },
1084
+ "athlete": {
1085
+ "id": 134815,
1086
+ "resource_state": 1
1087
+ },
1088
+ "elapsed_time": 2038,
1089
+ "moving_time": 2038,
1090
+ "start_date": "2018-02-16T14:56:25Z",
1091
+ "start_date_local": "2018-02-16T06:56:25Z",
1092
+ "distance": 9434.8,
1093
+ "start_index": 211,
1094
+ "end_index": 2246,
1095
+ "average_cadence": 78.6,
1096
+ "device_watts": true,
1097
+ "average_watts": 237.6,
1098
+ "segment": {
1099
+ "id": 673683,
1100
+ "resource_state": 2,
1101
+ "name": "Tunnel Rd.",
1102
+ "activity_type": "Ride",
1103
+ "distance": 9220.7,
1104
+ "average_grade": 4.2,
1105
+ "maximum_grade": 25.8,
1106
+ "elevation_high": 426.5,
1107
+ "elevation_low": 43.4,
1108
+ "start_latlng": [
1109
+ 37.8346153,
1110
+ -122.2520872
1111
+ ],
1112
+ "end_latlng": [
1113
+ 37.8476261,
1114
+ -122.2008944
1115
+ ],
1116
+ "climb_category": 3,
1117
+ "city": "Oakland",
1118
+ "state": "CA",
1119
+ "country": "United States",
1120
+ "private": false,
1121
+ "hazardous": false,
1122
+ "starred": false
1123
+ },
1124
+ "kom_rank": null,
1125
+ "pr_rank": null,
1126
+ "achievements": [],
1127
+ "hidden": false
1128
+ }
1129
+ ],
1130
+ "splits_metric": [
1131
+ {
1132
+ "distance": 1001.5,
1133
+ "elapsed_time": 141,
1134
+ "elevation_difference": 4.4,
1135
+ "moving_time": 141,
1136
+ "split": 1,
1137
+ "average_speed": 7.1,
1138
+ "pace_zone": 0
1139
+ }
1140
+ ],
1141
+ "laps": [
1142
+ {
1143
+ "id": 4479306946,
1144
+ "resource_state": 2,
1145
+ "name": "Lap 1",
1146
+ "activity": {
1147
+ "id": 1410355832,
1148
+ "resource_state": 1
1149
+ },
1150
+ "athlete": {
1151
+ "id": 134815,
1152
+ "resource_state": 1
1153
+ },
1154
+ "elapsed_time": 1573,
1155
+ "moving_time": 1569,
1156
+ "start_date": "2018-02-16T14:52:54Z",
1157
+ "start_date_local": "2018-02-16T06:52:54Z",
1158
+ "distance": 8046.72,
1159
+ "start_index": 0,
1160
+ "end_index": 1570,
1161
+ "total_elevation_gain": 276,
1162
+ "average_speed": 5.12,
1163
+ "max_speed": 9.5,
1164
+ "average_cadence": 78.6,
1165
+ "device_watts": true,
1166
+ "average_watts": 233.1,
1167
+ "lap_index": 1,
1168
+ "split": 1
1169
+ }
1170
+ ],
1171
+ "gear": {
1172
+ "id": "b12345678987654321",
1173
+ "primary": true,
1174
+ "name": "Tarmac",
1175
+ "resource_state": 2,
1176
+ "distance": 32547610
1177
+ },
1178
+ "partner_brand_tag": null,
1179
+ "photos": {
1180
+ "primary": {
1181
+ "id": null,
1182
+ "unique_id": "3FDGKL3-204E-4867-9E8D-89FC79EAAE17",
1183
+ "urls": {
1184
+ "100": "https://xxxxx.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-128x96.jpg",
1185
+ "600": "https://xxxxx.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-768x576.jpg"
1186
+ },
1187
+ "source": 1
1188
+ },
1189
+ "use_primary_photo": true,
1190
+ "count": 2
1191
+ },
1192
+ "highlighted_kudosers": [
1193
+ {
1194
+ "destination_url": "strava://athletes/12345678987654321",
1195
+ "display_name": "Marianne V.",
1196
+ "avatar_url": "https://xxxxx.cloudfront.net/pictures/athletes/12345678987654321/12345678987654321/3/medium.jpg",
1197
+ "show_name": true
1198
+ }
1199
+ ],
1200
+ "hide_from_home": false,
1201
+ "device_name": "Garmin Edge 1030",
1202
+ "embed_token": "18e4615989b47dd4ff3dc711b0aa4502e4b311a9",
1203
+ "segment_leaderboard_opt_out": false,
1204
+ "leaderboard_opt_out": false
1205
+ }
1206
+ }
1207
+ },
1208
+ "default": {
1209
+ "description": "Unexpected error.",
1210
+ "schema": {
1211
+ "$ref": "#/definitions/Fault"
1212
+ }
1213
+ }
1214
+ }
1215
+ },
1216
+ "put": {
1217
+ "operationId": "updateActivityById",
1218
+ "summary": "Update Activity",
1219
+ "description": "Updates the given activity that is owned by the authenticated athlete. Requires activity:write. Also requires activity:read_all in order to update Only Me activities",
1220
+ "parameters": [
1221
+ {
1222
+ "name": "id",
1223
+ "in": "path",
1224
+ "description": "The identifier of the activity.",
1225
+ "required": true,
1226
+ "type": "integer",
1227
+ "format": "int64"
1228
+ },
1229
+ {
1230
+ "name": "body",
1231
+ "in": "body",
1232
+ "schema": {
1233
+ "$ref": "#/definitions/UpdatableActivity"
1234
+ }
1235
+ }
1236
+ ],
1237
+ "tags": [
1238
+ "Activities"
1239
+ ],
1240
+ "responses": {
1241
+ "200": {
1242
+ "description": "The activity's detailed representation.",
1243
+ "schema": {
1244
+ "$ref": "#/definitions/DetailedActivity"
1245
+ },
1246
+ "examples": {
1247
+ "application/json": {
1248
+ "id": 12345678987654320,
1249
+ "resource_state": 3,
1250
+ "external_id": "garmin_push_12345678987654321",
1251
+ "upload_id": 98765432123456780,
1252
+ "athlete": {
1253
+ "id": 134815,
1254
+ "resource_state": 1
1255
+ },
1256
+ "name": "Happy Friday",
1257
+ "distance": 28099,
1258
+ "moving_time": 4207,
1259
+ "elapsed_time": 4410,
1260
+ "total_elevation_gain": 516,
1261
+ "type": "Ride",
1262
+ "sport_type": "MountainBikeRide",
1263
+ "start_date": "2018-02-16T14:52:54Z",
1264
+ "start_date_local": "2018-02-16T06:52:54Z",
1265
+ "timezone": "(GMT-08:00) America/Los_Angeles",
1266
+ "utc_offset": -28800,
1267
+ "start_latlng": [
1268
+ 37.83,
1269
+ -122.26
1270
+ ],
1271
+ "end_latlng": [
1272
+ 37.83,
1273
+ -122.26
1274
+ ],
1275
+ "location_city": null,
1276
+ "location_state": null,
1277
+ "location_country": "United States",
1278
+ "achievement_count": 0,
1279
+ "kudos_count": 19,
1280
+ "comment_count": 0,
1281
+ "athlete_count": 1,
1282
+ "photo_count": 0,
1283
+ "map": {
1284
+ "id": "a1410355832",
1285
+ "polyline": "ki{eFvqfiVqAWQIGEEKAYJgBVqDJ{BHa@jAkNJw@Pw@V{APs@^aABQAOEQGKoJ_FuJkFqAo@{A}@sH{DiAs@Q]?WVy@`@oBt@_CB]KYMMkB{AQEI@WT{BlE{@zAQPI@ICsCqA_BcAeCmAaFmCqIoEcLeG}KcG}A}@cDaBiDsByAkAuBqBi@y@_@o@o@kB}BgIoA_EUkAMcACa@BeBBq@LaAJe@b@uA`@_AdBcD`@iAPq@RgALqAB{@EqAyAoOCy@AmCBmANqBLqAZkB\\iCPiBJwCCsASiCq@iD]eA]y@[i@w@mAa@i@k@g@kAw@i@Ya@Q]EWFMLa@~BYpAFNpA`Aj@n@X`@V`AHh@JfB@xAMvAGZGHIDIAWOEQNcC@sACYK[MSOMe@QKKKYOs@UYQISCQ?Q@WNo@r@OHGAGCKOQ_BU}@MQGG]Io@@c@FYNg@d@s@d@ODQAMOMaASs@_@a@SESAQDqBn@a@RO?KK?UBU\\kA@Y?WMo@Iy@GWQ_@WSSGg@AkABQB_Ap@_A^o@b@Q@o@IS@OHi@n@OFS?OI}@iAQMQGQC}@DOIIUK{@IUOMyBo@kASOKIQCa@L[|AgATWN[He@?QKw@FOPCh@Fx@l@TDLELKl@aAHIJEX@r@ZTDV@LENQVg@RkA@c@MeA?WFOPMf@Ej@Fj@@LGHKDM?_@_@iC?a@HKRIl@NT?FCHMFW?YEYGWQa@GYBiAIq@Gq@L_BHSHK|@WJETSLQZs@z@_A~@uA^U`@G\\CRB\\Tl@p@Th@JZ^bB`@lAHLXVLDP?LGFSKiDBo@d@wBVi@R]VYVE\\@`@Lh@Fh@CzAk@RSDQA]GYe@eAGWSiBAWBWBIJORK`@KPOPSTg@h@}Ad@o@F[E_@EGMKUGmAEYGMIMYKs@?a@J}@@_BD_@HQJMx@e@LKHKHWAo@UoAAWFmAH}@?w@C[YwAAc@HSNM|Ao@rA}@zAq@`@a@j@eAxAuBXQj@MXSR[b@gAFg@?YISOGaAHi@Xw@v@_@d@WRSFqARUHQJc@d@m@`A[VSFUBcAEU@WFULUPa@v@Y~@UrBc@dBI~@?l@P~ABt@N`HEjA]zAEp@@p@TrBCl@CTQb@k@dAg@jAU^KJYLK@k@A[Js@d@a@b@]RgBl@[FMAw@[]G]?m@D_@F]P[Vu@t@[TMF_@Do@E_@@q@P]PWZUZw@vAkAlAGJOj@IlAMd@OR{@p@a@d@sBpD]v@a@`Aa@n@]TODgBVk@Pe@^cBfBc@Rs@La@RSPm@|@wCpDS^Wp@QZML{@l@qBbCYd@k@lAIVCZBZNTr@`@RRHZANIZQPKDW@e@CaASU?I@YTKRQx@@\\VmALYRQLCL?v@P|@D\\GJEFKDM@OCa@COOYIGm@YMUCM@]JYr@uAx@kAt@}@jAeAPWbAkBj@s@bAiAz@oAj@m@VQlAc@VQ~@aA`Au@p@Q`AIv@MZORUV_@p@iB|AoCh@q@dAaANUNWH[N{AJ[^m@t@_Av@wA\\a@`@W`@In@Al@B^E`@Wl@u@\\[VQ\\K`@Eb@?R@dAZP@d@CRExAs@\\Yt@{@LG\\MjAATINOXo@d@kAl@_AHYBOCe@QiBCm@Fq@\\wADo@AyGEeBWuB@YHu@Tu@Lk@VcCTo@d@aA\\WJE`@G~@FP?VI\\U~@sANO`@SfAMj@U\\WjAsAXS`@UNENALBHFFL?^Ml@Uj@]b@q@RUJSPkChEc@XcAb@sA|@]PaA\\OJKNER?TDTNj@Jn@?p@OfC@ZR`B@VCV_@n@{@l@WbACv@OlABnAPl@LNNHbBBNBLFFJ@^GLg@x@i@|AMP[X}@XOJKPET?l@LhAFXp@fBDRCd@S\\_@Ps@PQ@}A]S?QDe@V]b@MR[fAKt@ErAF~CANILYDKGIKe@{@Yy@e@sB[gA[c@e@YUCU?WBUHUNQPq@`AiArAMV[^e@Zc@JQJKNMz@?r@Bb@PfAAfA@VVbADn@E`@KHSEe@SMAKDKFM\\^dDCh@m@LoAQ_@@MFOZLfBEl@QbASd@KLQBOAaAc@QAQ@QHc@v@ONMJOBOCg@c@]O[EMBKFGL?RHv@ARERGNe@h@{@h@WVGNDt@JLNFPFz@LdBf@f@PJNHPF`ADPJJJDl@I`@B^Tp@bALJNDNALIf@i@PGPCt@DNE`@Uv@[dAw@RITGRCtAARBPJLPJRZxB?VEX_@vAAR?RDNHJJBh@UnBm@h@IRDRJNNJPNbBFRJLLBLCzAmAd@Uf@Gf@?P@PFJNHPFTH`BDTHNJJJ@LG`@m@^YPER@RDPHNNJRLn@HRLN^VNPHTFX@\\UlDFb@FHh@NP@HKPsB?}ASkCQ{@[y@q@}@cA{@KOCQDa@t@{CFGJCf@Nl@ZtA~@r@p@`@h@rAxBd@rA\\fARdAPjANrB?f@AtBCd@QfBkAjJOlBChA?rBFrBNlBdAfKFzAC~@Iz@Mz@Sv@s@jBmAxBi@hAWt@Sv@Qx@O`BA`@?dAPfBVpAd@`BfBlFf@fBdA~Cr@pAz@fApBhBjAt@H?IL?FBFJLx@^lHvDvh@~XnElCbAd@pGhDbAb@nAr@`Ad@`GhDnBbAxCbBrWhNJJDPARGP_@t@Qh@]pAUtAoA`Ny@jJApBBNFLJFJBv@Hb@HBF?\\",
1286
+ "resource_state": 3,
1287
+ "summary_polyline": "ki{eFvqfiVsBmA`Feh@qg@iX`B}JeCcCqGjIq~@kf@cM{KeHeX`@_GdGkSeBiXtB}YuEkPwFyDeAzAe@pC~DfGc@bIOsGmCcEiD~@oBuEkFhBcBmDiEfAVuDiAuD}NnDaNiIlCyDD_CtJKv@wGhD]YyEzBo@g@uKxGmHpCGtEtI~AuLrHkAcAaIvEgH_EaDR_FpBuBg@sNxHqEtHgLoTpIiCzKNr[sB|Es\\`JyObYeMbGsMnPsAfDxAnD}DBu@bCx@{BbEEyAoD`AmChNoQzMoGhOwX|[yIzBeFKg[zAkIdU_LiHxK}HzEh@vM_BtBg@xGzDbCcF~GhArHaIfByAhLsDiJuC?_HbHd@nL_Cz@ZnEkDDy@hHwJLiCbIrNrIvN_EfAjDWlEnEiAfBxDlFkBfBtEfDaAzBvDKdFx@|@XgJmDsHhAgD`GfElEzOwBnYdBxXgGlSc@bGdHpW|HdJztBnhAgFxc@HnCvBdA"
1288
+ },
1289
+ "trainer": false,
1290
+ "commute": false,
1291
+ "manual": false,
1292
+ "private": false,
1293
+ "flagged": false,
1294
+ "gear_id": "b12345678987654321",
1295
+ "from_accepted_tag": false,
1296
+ "average_speed": 6.679,
1297
+ "max_speed": 18.5,
1298
+ "average_cadence": 78.5,
1299
+ "average_temp": 4,
1300
+ "average_watts": 185.5,
1301
+ "weighted_average_watts": 230,
1302
+ "kilojoules": 780.5,
1303
+ "device_watts": true,
1304
+ "has_heartrate": false,
1305
+ "max_watts": 743,
1306
+ "elev_high": 446.6,
1307
+ "elev_low": 17.2,
1308
+ "pr_count": 0,
1309
+ "total_photo_count": 2,
1310
+ "has_kudoed": false,
1311
+ "workout_type": 10,
1312
+ "suffer_score": null,
1313
+ "description": "",
1314
+ "calories": 870.2,
1315
+ "segment_efforts": [
1316
+ {
1317
+ "id": 12345678987654320,
1318
+ "resource_state": 2,
1319
+ "name": "Tunnel Rd.",
1320
+ "activity": {
1321
+ "id": 12345678987654320,
1322
+ "resource_state": 1
1323
+ },
1324
+ "athlete": {
1325
+ "id": 12345678987654320,
1326
+ "resource_state": 1
1327
+ },
1328
+ "elapsed_time": 2038,
1329
+ "moving_time": 2038,
1330
+ "start_date": "2018-02-16T14:56:25Z",
1331
+ "start_date_local": "2018-02-16T06:56:25Z",
1332
+ "distance": 9434.8,
1333
+ "start_index": 211,
1334
+ "end_index": 2246,
1335
+ "average_cadence": 78.6,
1336
+ "device_watts": true,
1337
+ "average_watts": 237.6,
1338
+ "segment": {
1339
+ "id": 673683,
1340
+ "resource_state": 2,
1341
+ "name": "Tunnel Rd.",
1342
+ "activity_type": "Ride",
1343
+ "distance": 9220.7,
1344
+ "average_grade": 4.2,
1345
+ "maximum_grade": 25.8,
1346
+ "elevation_high": 426.5,
1347
+ "elevation_low": 43.4,
1348
+ "start_latlng": [
1349
+ 37.8346153,
1350
+ -122.2520872
1351
+ ],
1352
+ "end_latlng": [
1353
+ 37.8476261,
1354
+ -122.2008944
1355
+ ],
1356
+ "climb_category": 3,
1357
+ "city": "Oakland",
1358
+ "state": "CA",
1359
+ "country": "United States",
1360
+ "private": false,
1361
+ "hazardous": false,
1362
+ "starred": false
1363
+ },
1364
+ "kom_rank": null,
1365
+ "pr_rank": null,
1366
+ "achievements": [],
1367
+ "hidden": false
1368
+ }
1369
+ ],
1370
+ "splits_metric": [
1371
+ {
1372
+ "distance": 1001.5,
1373
+ "elapsed_time": 141,
1374
+ "elevation_difference": 4.4,
1375
+ "moving_time": 141,
1376
+ "split": 1,
1377
+ "average_speed": 7.1,
1378
+ "pace_zone": 0
1379
+ }
1380
+ ],
1381
+ "laps": [
1382
+ {
1383
+ "id": 4479306946,
1384
+ "resource_state": 2,
1385
+ "name": "Lap 1",
1386
+ "activity": {
1387
+ "id": 1410355832,
1388
+ "resource_state": 1
1389
+ },
1390
+ "athlete": {
1391
+ "id": 134815,
1392
+ "resource_state": 1
1393
+ },
1394
+ "elapsed_time": 1573,
1395
+ "moving_time": 1569,
1396
+ "start_date": "2018-02-16T14:52:54Z",
1397
+ "start_date_local": "2018-02-16T06:52:54Z",
1398
+ "distance": 8046.72,
1399
+ "start_index": 0,
1400
+ "end_index": 1570,
1401
+ "total_elevation_gain": 276,
1402
+ "average_speed": 5.12,
1403
+ "max_speed": 9.5,
1404
+ "average_cadence": 78.6,
1405
+ "device_watts": true,
1406
+ "average_watts": 233.1,
1407
+ "lap_index": 1,
1408
+ "split": 1
1409
+ }
1410
+ ],
1411
+ "gear": {
1412
+ "id": "b12345678987654321",
1413
+ "primary": true,
1414
+ "name": "Tarmac",
1415
+ "resource_state": 2,
1416
+ "distance": 32547610
1417
+ },
1418
+ "partner_brand_tag": null,
1419
+ "photos": {
1420
+ "primary": {
1421
+ "id": null,
1422
+ "unique_id": "3FDGKL3-204E-4867-9E8D-89FC79EAAE17",
1423
+ "urls": {
1424
+ "100": "https://xxxxx.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-128x96.jpg",
1425
+ "600": "https://xxxxx.cloudfront.net/Bv93zv5t_mr57v0wXFbY_JyvtucgmU5Ym6N9z_bKeUI-768x576.jpg"
1426
+ },
1427
+ "source": 1
1428
+ },
1429
+ "use_primary_photo": true,
1430
+ "count": 2
1431
+ },
1432
+ "highlighted_kudosers": [
1433
+ {
1434
+ "destination_url": "strava://athletes/12345678987654321",
1435
+ "display_name": "Marianne V.",
1436
+ "avatar_url": "https://xxxxx.cloudfront.net/pictures/athletes/12345678987654321/12345678987654321/3/medium.jpg",
1437
+ "show_name": true
1438
+ }
1439
+ ],
1440
+ "hide_from_home": false,
1441
+ "device_name": "Garmin Edge 1030",
1442
+ "embed_token": "18e4615989b47dd4ff3dc711b0aa4502e4b311a9",
1443
+ "segment_leaderboard_opt_out": false,
1444
+ "leaderboard_opt_out": false
1445
+ }
1446
+ }
1447
+ },
1448
+ "default": {
1449
+ "description": "Unexpected error.",
1450
+ "schema": {
1451
+ "$ref": "#/definitions/Fault"
1452
+ }
1453
+ }
1454
+ }
1455
+ }
1456
+ },
1457
+ "/athlete/activities": {
1458
+ "get": {
1459
+ "operationId": "getLoggedInAthleteActivities",
1460
+ "summary": "List Athlete Activities",
1461
+ "description": "Returns the activities of an athlete for a specific identifier. Requires activity:read. Only Me activities will be filtered out unless requested by a token with activity:read_all.",
1462
+ "parameters": [
1463
+ {
1464
+ "name": "before",
1465
+ "in": "query",
1466
+ "description": "An epoch timestamp to use for filtering activities that have taken place before a certain time.",
1467
+ "type": "integer"
1468
+ },
1469
+ {
1470
+ "name": "after",
1471
+ "in": "query",
1472
+ "description": "An epoch timestamp to use for filtering activities that have taken place after a certain time.",
1473
+ "type": "integer"
1474
+ },
1475
+ {
1476
+ "$ref": "#/parameters/page"
1477
+ },
1478
+ {
1479
+ "$ref": "#/parameters/perPage"
1480
+ }
1481
+ ],
1482
+ "tags": [
1483
+ "Activities"
1484
+ ],
1485
+ "responses": {
1486
+ "200": {
1487
+ "description": "The authenticated athlete's activities",
1488
+ "schema": {
1489
+ "type": "array",
1490
+ "items": {
1491
+ "$ref": "#/definitions/SummaryActivity"
1492
+ }
1493
+ },
1494
+ "examples": {
1495
+ "application/json": [
1496
+ {
1497
+ "resource_state": 2,
1498
+ "athlete": {
1499
+ "id": 134815,
1500
+ "resource_state": 1
1501
+ },
1502
+ "name": "Happy Friday",
1503
+ "distance": 24931.4,
1504
+ "moving_time": 4500,
1505
+ "elapsed_time": 4500,
1506
+ "total_elevation_gain": 0,
1507
+ "type": "Ride",
1508
+ "sport_type": "MountainBikeRide",
1509
+ "workout_type": null,
1510
+ "id": 154504250376823,
1511
+ "external_id": "garmin_push_12345678987654321",
1512
+ "upload_id": 987654321234567900000,
1513
+ "start_date": "2018-05-02T12:15:09Z",
1514
+ "start_date_local": "2018-05-02T05:15:09Z",
1515
+ "timezone": "(GMT-08:00) America/Los_Angeles",
1516
+ "utc_offset": -25200,
1517
+ "start_latlng": null,
1518
+ "end_latlng": null,
1519
+ "location_city": null,
1520
+ "location_state": null,
1521
+ "location_country": "United States",
1522
+ "achievement_count": 0,
1523
+ "kudos_count": 3,
1524
+ "comment_count": 1,
1525
+ "athlete_count": 1,
1526
+ "photo_count": 0,
1527
+ "map": {
1528
+ "id": "a12345678987654321",
1529
+ "summary_polyline": null,
1530
+ "resource_state": 2
1531
+ },
1532
+ "device_name": "Garmin Edge 1030",
1533
+ "trainer": true,
1534
+ "commute": false,
1535
+ "manual": false,
1536
+ "private": false,
1537
+ "flagged": false,
1538
+ "gear_id": "b12345678987654321",
1539
+ "from_accepted_tag": false,
1540
+ "average_speed": 5.54,
1541
+ "max_speed": 11,
1542
+ "average_cadence": 67.1,
1543
+ "average_watts": 175.3,
1544
+ "weighted_average_watts": 210,
1545
+ "kilojoules": 788.7,
1546
+ "device_watts": true,
1547
+ "has_heartrate": true,
1548
+ "average_heartrate": 140.3,
1549
+ "max_heartrate": 178,
1550
+ "max_watts": 406,
1551
+ "pr_count": 0,
1552
+ "total_photo_count": 1,
1553
+ "has_kudoed": false,
1554
+ "suffer_score": 82
1555
+ },
1556
+ {
1557
+ "resource_state": 2,
1558
+ "athlete": {
1559
+ "id": 167560,
1560
+ "resource_state": 1
1561
+ },
1562
+ "name": "Bondcliff",
1563
+ "distance": 23676.5,
1564
+ "moving_time": 5400,
1565
+ "elapsed_time": 5400,
1566
+ "total_elevation_gain": 0,
1567
+ "type": "Ride",
1568
+ "sport_type": "MountainBikeRide",
1569
+ "workout_type": null,
1570
+ "id": 1234567809,
1571
+ "external_id": "garmin_push_12345678987654321",
1572
+ "upload_id": 1234567819,
1573
+ "start_date": "2018-04-30T12:35:51Z",
1574
+ "start_date_local": "2018-04-30T05:35:51Z",
1575
+ "timezone": "(GMT-08:00) America/Los_Angeles",
1576
+ "utc_offset": -25200,
1577
+ "start_latlng": null,
1578
+ "end_latlng": null,
1579
+ "location_city": null,
1580
+ "location_state": null,
1581
+ "location_country": "United States",
1582
+ "achievement_count": 0,
1583
+ "kudos_count": 4,
1584
+ "comment_count": 0,
1585
+ "athlete_count": 1,
1586
+ "photo_count": 0,
1587
+ "map": {
1588
+ "id": "a12345689",
1589
+ "summary_polyline": null,
1590
+ "resource_state": 2
1591
+ },
1592
+ "device_name": "Garmin Edge 1030",
1593
+ "trainer": true,
1594
+ "commute": false,
1595
+ "manual": false,
1596
+ "private": false,
1597
+ "flagged": false,
1598
+ "gear_id": "b12345678912343",
1599
+ "from_accepted_tag": false,
1600
+ "average_speed": 4.385,
1601
+ "max_speed": 8.8,
1602
+ "average_cadence": 69.8,
1603
+ "average_watts": 200,
1604
+ "weighted_average_watts": 214,
1605
+ "kilojoules": 1080,
1606
+ "device_watts": true,
1607
+ "has_heartrate": true,
1608
+ "average_heartrate": 152.4,
1609
+ "max_heartrate": 183,
1610
+ "max_watts": 403,
1611
+ "pr_count": 0,
1612
+ "total_photo_count": 1,
1613
+ "has_kudoed": false,
1614
+ "suffer_score": 162
1615
+ }
1616
+ ]
1617
+ }
1618
+ },
1619
+ "default": {
1620
+ "description": "Unexpected error.",
1621
+ "schema": {
1622
+ "$ref": "#/definitions/Fault"
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ },
1628
+ "/activities/{id}/laps": {
1629
+ "get": {
1630
+ "operationId": "getLapsByActivityId",
1631
+ "summary": "List Activity Laps",
1632
+ "description": "Returns the laps of an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
1633
+ "parameters": [
1634
+ {
1635
+ "name": "id",
1636
+ "in": "path",
1637
+ "description": "The identifier of the activity.",
1638
+ "required": true,
1639
+ "type": "integer",
1640
+ "format": "int64"
1641
+ }
1642
+ ],
1643
+ "tags": [
1644
+ "Activities"
1645
+ ],
1646
+ "responses": {
1647
+ "200": {
1648
+ "description": "Activity Laps.",
1649
+ "schema": {
1650
+ "type": "array",
1651
+ "items": {
1652
+ "$ref": "#/definitions/Lap"
1653
+ }
1654
+ },
1655
+ "examples": {
1656
+ "application/json": [
1657
+ {
1658
+ "id": 12345678987654320,
1659
+ "resource_state": 2,
1660
+ "name": "Lap 1",
1661
+ "activity": {
1662
+ "id": 12345678987654320,
1663
+ "resource_state": 1
1664
+ },
1665
+ "athlete": {
1666
+ "id": 12345678987654320,
1667
+ "resource_state": 1
1668
+ },
1669
+ "elapsed_time": 1691,
1670
+ "moving_time": 1587,
1671
+ "start_date": "2018-02-08T14:13:37Z",
1672
+ "start_date_local": "2018-02-08T06:13:37Z",
1673
+ "distance": 8046.72,
1674
+ "start_index": 0,
1675
+ "end_index": 1590,
1676
+ "total_elevation_gain": 270,
1677
+ "average_speed": 4.76,
1678
+ "max_speed": 9.4,
1679
+ "average_cadence": 79,
1680
+ "device_watts": true,
1681
+ "average_watts": 228.2,
1682
+ "lap_index": 1,
1683
+ "split": 1
1684
+ }
1685
+ ]
1686
+ }
1687
+ },
1688
+ "default": {
1689
+ "description": "Unexpected error.",
1690
+ "schema": {
1691
+ "$ref": "#/definitions/Fault"
1692
+ }
1693
+ }
1694
+ }
1695
+ }
1696
+ },
1697
+ "/activities/{id}/zones": {
1698
+ "get": {
1699
+ "operationId": "getZonesByActivityId",
1700
+ "summary": "Get Activity Zones",
1701
+ "description": "Summit Feature. Returns the zones of a given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
1702
+ "parameters": [
1703
+ {
1704
+ "name": "id",
1705
+ "in": "path",
1706
+ "description": "The identifier of the activity.",
1707
+ "required": true,
1708
+ "type": "integer",
1709
+ "format": "int64"
1710
+ }
1711
+ ],
1712
+ "tags": [
1713
+ "Activities"
1714
+ ],
1715
+ "responses": {
1716
+ "200": {
1717
+ "description": "Activity Zones.",
1718
+ "schema": {
1719
+ "type": "array",
1720
+ "items": {
1721
+ "$ref": "#/definitions/ActivityZone"
1722
+ }
1723
+ }
1724
+ },
1725
+ "default": {
1726
+ "description": "Unexpected error.",
1727
+ "schema": {
1728
+ "$ref": "#/definitions/Fault"
1729
+ }
1730
+ }
1731
+ }
1732
+ }
1733
+ },
1734
+ "/activities/{id}/comments": {
1735
+ "get": {
1736
+ "operationId": "getCommentsByActivityId",
1737
+ "summary": "List Activity Comments",
1738
+ "description": "Returns the comments on the given activity. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
1739
+ "parameters": [
1740
+ {
1741
+ "name": "id",
1742
+ "in": "path",
1743
+ "description": "The identifier of the activity.",
1744
+ "required": true,
1745
+ "type": "integer",
1746
+ "format": "int64"
1747
+ },
1748
+ {
1749
+ "name": "page",
1750
+ "in": "query",
1751
+ "description": "Deprecated. Prefer to use after_cursor.",
1752
+ "type": "integer"
1753
+ },
1754
+ {
1755
+ "name": "per_page",
1756
+ "in": "query",
1757
+ "description": "Deprecated. Prefer to use page_size.",
1758
+ "type": "integer",
1759
+ "default": 30
1760
+ },
1761
+ {
1762
+ "name": "page_size",
1763
+ "in": "query",
1764
+ "description": "Number of items per page. Defaults to 30.",
1765
+ "type": "integer",
1766
+ "default": 30
1767
+ },
1768
+ {
1769
+ "name": "after_cursor",
1770
+ "in": "query",
1771
+ "description": "Cursor of the last item in the previous page of results, used to request the subsequent page of results. When omitted, the first page of results is fetched.",
1772
+ "type": "string"
1773
+ }
1774
+ ],
1775
+ "tags": [
1776
+ "Activities"
1777
+ ],
1778
+ "responses": {
1779
+ "200": {
1780
+ "description": "Comments.",
1781
+ "schema": {
1782
+ "type": "array",
1783
+ "items": {
1784
+ "$ref": "#/definitions/Comment"
1785
+ }
1786
+ },
1787
+ "examples": {
1788
+ "application/json": [
1789
+ {
1790
+ "id": 12345678987654320,
1791
+ "activity_id": 12345678987654320,
1792
+ "post_id": null,
1793
+ "resource_state": 2,
1794
+ "text": "Good job and keep the cat pictures coming!",
1795
+ "mentions_metadata": null,
1796
+ "created_at": "2018-02-08T19:25:39Z",
1797
+ "athlete": {
1798
+ "firstname": "Peter",
1799
+ "lastname": "S"
1800
+ },
1801
+ "cursor": "abc123%20"
1802
+ }
1803
+ ]
1804
+ }
1805
+ },
1806
+ "default": {
1807
+ "description": "Unexpected error.",
1808
+ "schema": {
1809
+ "$ref": "#/definitions/Fault"
1810
+ }
1811
+ }
1812
+ }
1813
+ }
1814
+ },
1815
+ "/activities/{id}/kudos": {
1816
+ "get": {
1817
+ "operationId": "getKudoersByActivityId",
1818
+ "summary": "List Activity Kudoers",
1819
+ "description": "Returns the athletes who kudoed an activity identified by an identifier. Requires activity:read for Everyone and Followers activities. Requires activity:read_all for Only Me activities.",
1820
+ "parameters": [
1821
+ {
1822
+ "name": "id",
1823
+ "in": "path",
1824
+ "description": "The identifier of the activity.",
1825
+ "required": true,
1826
+ "type": "integer",
1827
+ "format": "int64"
1828
+ },
1829
+ {
1830
+ "$ref": "#/parameters/page"
1831
+ },
1832
+ {
1833
+ "$ref": "#/parameters/perPage"
1834
+ }
1835
+ ],
1836
+ "tags": [
1837
+ "Activities"
1838
+ ],
1839
+ "responses": {
1840
+ "200": {
1841
+ "description": "Comments.",
1842
+ "schema": {
1843
+ "type": "array",
1844
+ "items": {
1845
+ "$ref": "#/definitions/SummaryAthlete"
1846
+ }
1847
+ },
1848
+ "examples": {
1849
+ "application/json": [
1850
+ {
1851
+ "firstname": "Peter",
1852
+ "lastname": "S"
1853
+ }
1854
+ ]
1855
+ }
1856
+ },
1857
+ "default": {
1858
+ "description": "Unexpected error.",
1859
+ "schema": {
1860
+ "$ref": "#/definitions/Fault"
1861
+ }
1862
+ }
1863
+ }
1864
+ }
1865
+ },
1866
+ "/clubs/{id}": {
1867
+ "get": {
1868
+ "operationId": "getClubById",
1869
+ "summary": "Get Club",
1870
+ "description": "Returns a given a club using its identifier.",
1871
+ "parameters": [
1872
+ {
1873
+ "name": "id",
1874
+ "in": "path",
1875
+ "description": "The identifier of the club.",
1876
+ "required": true,
1877
+ "type": "integer",
1878
+ "format": "int64"
1879
+ }
1880
+ ],
1881
+ "tags": [
1882
+ "Clubs"
1883
+ ],
1884
+ "responses": {
1885
+ "200": {
1886
+ "description": "The detailed representation of a club.",
1887
+ "schema": {
1888
+ "$ref": "#/definitions/DetailedClub"
1889
+ },
1890
+ "examples": {
1891
+ "application/json": {
1892
+ "id": 1,
1893
+ "resource_state": 3,
1894
+ "name": "Team Strava Cycling",
1895
+ "profile_medium": "https://xxxxx.cloudfront.net/pictures/clubs/1/1582/4/medium.jpg",
1896
+ "profile": "https://xxxxx.cloudfront.net/pictures/clubs/1/1582/4/large.jpg",
1897
+ "cover_photo": "https://xxxxx.cloudfront.net/pictures/clubs/1/4328276/1/large.jpg",
1898
+ "cover_photo_small": "https://xxxxx.cloudfront.net/pictures/clubs/1/4328276/1/small.jpg",
1899
+ "sport_type": "cycling",
1900
+ "activity_types": [
1901
+ "Ride",
1902
+ "VirtualRide",
1903
+ "EBikeRide",
1904
+ "Velomobile",
1905
+ "Handcycle"
1906
+ ],
1907
+ "city": "San Francisco",
1908
+ "state": "California",
1909
+ "country": "United States",
1910
+ "private": true,
1911
+ "member_count": 116,
1912
+ "featured": false,
1913
+ "verified": false,
1914
+ "url": "team-strava-bike",
1915
+ "membership": "member",
1916
+ "admin": false,
1917
+ "owner": false,
1918
+ "description": "Private club for Cyclists who work at Strava.",
1919
+ "club_type": "company",
1920
+ "post_count": 29,
1921
+ "owner_id": 759,
1922
+ "following_count": 107
1923
+ }
1924
+ }
1925
+ },
1926
+ "default": {
1927
+ "description": "Unexpected error.",
1928
+ "schema": {
1929
+ "$ref": "#/definitions/Fault"
1930
+ }
1931
+ }
1932
+ }
1933
+ }
1934
+ },
1935
+ "/clubs/{id}/members": {
1936
+ "get": {
1937
+ "operationId": "getClubMembersById",
1938
+ "summary": "List Club Members",
1939
+ "description": "Returns a list of the athletes who are members of a given club.",
1940
+ "parameters": [
1941
+ {
1942
+ "name": "id",
1943
+ "in": "path",
1944
+ "description": "The identifier of the club.",
1945
+ "required": true,
1946
+ "type": "integer",
1947
+ "format": "int64"
1948
+ },
1949
+ {
1950
+ "$ref": "#/parameters/page"
1951
+ },
1952
+ {
1953
+ "$ref": "#/parameters/perPage"
1954
+ }
1955
+ ],
1956
+ "tags": [
1957
+ "Clubs"
1958
+ ],
1959
+ "responses": {
1960
+ "200": {
1961
+ "description": "A list of club athlete representations.",
1962
+ "schema": {
1963
+ "type": "array",
1964
+ "items": {
1965
+ "$ref": "#/definitions/ClubAthlete"
1966
+ }
1967
+ },
1968
+ "examples": {
1969
+ "application/json": [
1970
+ {
1971
+ "resource_state": 2,
1972
+ "firstname": "Peter",
1973
+ "lastname": "S.",
1974
+ "membership": "member",
1975
+ "admin": false,
1976
+ "owner": false
1977
+ }
1978
+ ]
1979
+ }
1980
+ },
1981
+ "default": {
1982
+ "description": "Unexpected error.",
1983
+ "schema": {
1984
+ "$ref": "#/definitions/Fault"
1985
+ }
1986
+ }
1987
+ }
1988
+ }
1989
+ },
1990
+ "/clubs/{id}/admins": {
1991
+ "get": {
1992
+ "operationId": "getClubAdminsById",
1993
+ "summary": "List Club Administrators",
1994
+ "description": "Returns a list of the administrators of a given club.",
1995
+ "parameters": [
1996
+ {
1997
+ "name": "id",
1998
+ "in": "path",
1999
+ "description": "The identifier of the club.",
2000
+ "required": true,
2001
+ "type": "integer",
2002
+ "format": "int64"
2003
+ },
2004
+ {
2005
+ "$ref": "#/parameters/page"
2006
+ },
2007
+ {
2008
+ "$ref": "#/parameters/perPage"
2009
+ }
2010
+ ],
2011
+ "tags": [
2012
+ "Clubs"
2013
+ ],
2014
+ "responses": {
2015
+ "200": {
2016
+ "description": "A list of summary athlete representations.",
2017
+ "schema": {
2018
+ "type": "array",
2019
+ "items": {
2020
+ "$ref": "#/definitions/SummaryAthlete"
2021
+ }
2022
+ },
2023
+ "examples": {
2024
+ "application/json": [
2025
+ {
2026
+ "resource_state": 2,
2027
+ "firstname": "Peter",
2028
+ "lastname": "S."
2029
+ }
2030
+ ]
2031
+ }
2032
+ },
2033
+ "default": {
2034
+ "description": "Unexpected error.",
2035
+ "schema": {
2036
+ "$ref": "#/definitions/Fault"
2037
+ }
2038
+ }
2039
+ }
2040
+ }
2041
+ },
2042
+ "/clubs/{id}/activities": {
2043
+ "get": {
2044
+ "operationId": "getClubActivitiesById",
2045
+ "summary": "List Club Activities",
2046
+ "description": "Retrieve recent activities from members of a specific club. The authenticated athlete must belong to the requested club in order to hit this endpoint. Pagination is supported. Athlete profile visibility is respected for all activities.",
2047
+ "parameters": [
2048
+ {
2049
+ "name": "id",
2050
+ "in": "path",
2051
+ "description": "The identifier of the club.",
2052
+ "required": true,
2053
+ "type": "integer",
2054
+ "format": "int64"
2055
+ },
2056
+ {
2057
+ "$ref": "#/parameters/page"
2058
+ },
2059
+ {
2060
+ "$ref": "#/parameters/perPage"
2061
+ }
2062
+ ],
2063
+ "tags": [
2064
+ "Clubs"
2065
+ ],
2066
+ "responses": {
2067
+ "200": {
2068
+ "description": "A list of activities.",
2069
+ "schema": {
2070
+ "type": "array",
2071
+ "items": {
2072
+ "$ref": "#/definitions/ClubActivity"
2073
+ }
2074
+ },
2075
+ "examples": {
2076
+ "application/json": [
2077
+ {
2078
+ "resource_state": 2,
2079
+ "athlete": {
2080
+ "resource_state": 2,
2081
+ "firstname": "Peter",
2082
+ "lastname": "S."
2083
+ },
2084
+ "name": "World Championship",
2085
+ "distance": 2641.7,
2086
+ "moving_time": 577,
2087
+ "elapsed_time": 635,
2088
+ "total_elevation_gain": 8.8,
2089
+ "type": "Ride",
2090
+ "sport_type": "MountainBikeRide",
2091
+ "workout_type": null
2092
+ }
2093
+ ]
2094
+ }
2095
+ },
2096
+ "default": {
2097
+ "description": "Unexpected error.",
2098
+ "schema": {
2099
+ "$ref": "#/definitions/Fault"
2100
+ }
2101
+ }
2102
+ }
2103
+ }
2104
+ },
2105
+ "/athlete/clubs": {
2106
+ "get": {
2107
+ "operationId": "getLoggedInAthleteClubs",
2108
+ "summary": "List Athlete Clubs",
2109
+ "description": "Returns a list of the clubs whose membership includes the authenticated athlete.",
2110
+ "parameters": [
2111
+ {
2112
+ "$ref": "#/parameters/page"
2113
+ },
2114
+ {
2115
+ "$ref": "#/parameters/perPage"
2116
+ }
2117
+ ],
2118
+ "tags": [
2119
+ "Clubs"
2120
+ ],
2121
+ "responses": {
2122
+ "200": {
2123
+ "description": "A list of summary club representations.",
2124
+ "schema": {
2125
+ "type": "array",
2126
+ "items": {
2127
+ "$ref": "#/definitions/SummaryClub"
2128
+ }
2129
+ },
2130
+ "examples": {
2131
+ "application/json": [
2132
+ {
2133
+ "id": 231407,
2134
+ "resource_state": 2,
2135
+ "name": "The Strava Club",
2136
+ "profile_medium": "https://xxxxx.cloudfront.net/pictures/clubs/231407/5319085/1/medium.jpg",
2137
+ "profile": "https://xxxxx.cloudfront.net/pictures/clubs/231407/5319085/1/large.jpg",
2138
+ "cover_photo": "https://xxxxx.cloudfront.net/pictures/clubs/231407/5098428/4/large.jpg",
2139
+ "cover_photo_small": "https://xxxxx.cloudfront.net/pictures/clubs/231407/5098428/4/small.jpg",
2140
+ "sport_type": "other",
2141
+ "city": "San Francisco",
2142
+ "state": "California",
2143
+ "country": "United States",
2144
+ "private": false,
2145
+ "member_count": 93151,
2146
+ "featured": false,
2147
+ "verified": true,
2148
+ "url": "strava"
2149
+ }
2150
+ ]
2151
+ }
2152
+ },
2153
+ "default": {
2154
+ "description": "Unexpected error.",
2155
+ "schema": {
2156
+ "$ref": "#/definitions/Fault"
2157
+ }
2158
+ }
2159
+ }
2160
+ }
2161
+ },
2162
+ "/gear/{id}": {
2163
+ "get": {
2164
+ "operationId": "getGearById",
2165
+ "summary": "Get Equipment",
2166
+ "description": "Returns an equipment using its identifier.",
2167
+ "parameters": [
2168
+ {
2169
+ "name": "id",
2170
+ "in": "path",
2171
+ "description": "The identifier of the gear.",
2172
+ "required": true,
2173
+ "type": "string"
2174
+ }
2175
+ ],
2176
+ "tags": [
2177
+ "Gears"
2178
+ ],
2179
+ "responses": {
2180
+ "200": {
2181
+ "description": "A representation of the gear.",
2182
+ "schema": {
2183
+ "$ref": "#/definitions/DetailedGear"
2184
+ },
2185
+ "examples": {
2186
+ "application/json": {
2187
+ "id": "b1231",
2188
+ "primary": false,
2189
+ "resource_state": 3,
2190
+ "distance": 388206,
2191
+ "brand_name": "BMC",
2192
+ "model_name": "Teammachine",
2193
+ "frame_type": 3,
2194
+ "description": "My Bike."
2195
+ }
2196
+ }
2197
+ },
2198
+ "default": {
2199
+ "description": "Unexpected error.",
2200
+ "schema": {
2201
+ "$ref": "#/definitions/Fault"
2202
+ }
2203
+ }
2204
+ }
2205
+ }
2206
+ },
2207
+ "/routes/{id}": {
2208
+ "get": {
2209
+ "operationId": "getRouteById",
2210
+ "summary": "Get Route",
2211
+ "description": "Returns a route using its identifier. Requires read_all scope for private routes.",
2212
+ "parameters": [
2213
+ {
2214
+ "name": "id",
2215
+ "in": "path",
2216
+ "description": "The identifier of the route.",
2217
+ "required": true,
2218
+ "type": "integer",
2219
+ "format": "int64"
2220
+ }
2221
+ ],
2222
+ "tags": [
2223
+ "Routes"
2224
+ ],
2225
+ "responses": {
2226
+ "200": {
2227
+ "description": "A representation of the route.",
2228
+ "schema": {
2229
+ "$ref": "#/definitions/Route"
2230
+ }
2231
+ },
2232
+ "default": {
2233
+ "description": "Unexpected error.",
2234
+ "schema": {
2235
+ "$ref": "#/definitions/Fault"
2236
+ }
2237
+ }
2238
+ }
2239
+ }
2240
+ },
2241
+ "/athletes/{id}/routes": {
2242
+ "get": {
2243
+ "operationId": "getRoutesByAthleteId",
2244
+ "summary": "List Athlete Routes",
2245
+ "description": "Returns a list of the routes created by the authenticated athlete. Private routes are filtered out unless requested by a token with read_all scope.",
2246
+ "parameters": [
2247
+ {
2248
+ "$ref": "#/parameters/page"
2249
+ },
2250
+ {
2251
+ "$ref": "#/parameters/perPage"
2252
+ }
2253
+ ],
2254
+ "tags": [
2255
+ "Routes"
2256
+ ],
2257
+ "responses": {
2258
+ "200": {
2259
+ "description": "A representation of the route.",
2260
+ "schema": {
2261
+ "type": "array",
2262
+ "items": {
2263
+ "$ref": "#/definitions/Route"
2264
+ }
2265
+ }
2266
+ },
2267
+ "default": {
2268
+ "description": "Unexpected error.",
2269
+ "schema": {
2270
+ "$ref": "#/definitions/Fault"
2271
+ }
2272
+ }
2273
+ }
2274
+ }
2275
+ },
2276
+ "/routes/{id}/export_gpx": {
2277
+ "get": {
2278
+ "operationId": "getRouteAsGPX",
2279
+ "summary": "Export Route GPX",
2280
+ "description": "Returns a GPX file of the route. Requires read_all scope for private routes.",
2281
+ "parameters": [
2282
+ {
2283
+ "name": "id",
2284
+ "in": "path",
2285
+ "description": "The identifier of the route.",
2286
+ "required": true,
2287
+ "type": "integer",
2288
+ "format": "int64"
2289
+ }
2290
+ ],
2291
+ "tags": [
2292
+ "Routes"
2293
+ ],
2294
+ "responses": {
2295
+ "200": {
2296
+ "description": "A GPX file with the route.",
2297
+ "content": {
2298
+ "application/gpx+xml": {
2299
+ "schema": {
2300
+ "type": "string",
2301
+ "format": "binary"
2302
+ }
2303
+ }
2304
+ }
2305
+ },
2306
+ "default": {
2307
+ "description": "Unexpected error.",
2308
+ "schema": {
2309
+ "$ref": "#/definitions/Fault"
2310
+ }
2311
+ }
2312
+ }
2313
+ }
2314
+ },
2315
+ "/routes/{id}/export_tcx": {
2316
+ "get": {
2317
+ "operationId": "getRouteAsTCX",
2318
+ "summary": "Export Route TCX",
2319
+ "description": "Returns a TCX file of the route. Requires read_all scope for private routes.",
2320
+ "parameters": [
2321
+ {
2322
+ "name": "id",
2323
+ "in": "path",
2324
+ "description": "The identifier of the route.",
2325
+ "required": true,
2326
+ "type": "integer",
2327
+ "format": "int64"
2328
+ }
2329
+ ],
2330
+ "tags": [
2331
+ "Routes"
2332
+ ],
2333
+ "responses": {
2334
+ "200": {
2335
+ "description": "A TCX file with the route.",
2336
+ "content": {
2337
+ "application/tcx+xml": {
2338
+ "schema": {
2339
+ "type": "string",
2340
+ "format": "binary"
2341
+ }
2342
+ }
2343
+ }
2344
+ },
2345
+ "default": {
2346
+ "description": "Unexpected error.",
2347
+ "schema": {
2348
+ "$ref": "#/definitions/Fault"
2349
+ }
2350
+ }
2351
+ }
2352
+ }
2353
+ },
2354
+ "/uploads": {
2355
+ "post": {
2356
+ "operationId": "createUpload",
2357
+ "summary": "Upload Activity",
2358
+ "description": "Uploads a new data file to create an activity from. Requires activity:write scope.",
2359
+ "consumes": [
2360
+ "multipart/form-data"
2361
+ ],
2362
+ "parameters": [
2363
+ {
2364
+ "name": "file",
2365
+ "in": "formData",
2366
+ "type": "file",
2367
+ "description": "The uploaded file."
2368
+ },
2369
+ {
2370
+ "name": "name",
2371
+ "in": "formData",
2372
+ "description": "The desired name of the resulting activity.",
2373
+ "type": "string"
2374
+ },
2375
+ {
2376
+ "name": "description",
2377
+ "in": "formData",
2378
+ "description": "The desired description of the resulting activity.",
2379
+ "type": "string"
2380
+ },
2381
+ {
2382
+ "name": "trainer",
2383
+ "in": "formData",
2384
+ "description": "Whether the resulting activity should be marked as having been performed on a trainer.",
2385
+ "type": "string"
2386
+ },
2387
+ {
2388
+ "name": "commute",
2389
+ "in": "formData",
2390
+ "description": "Whether the resulting activity should be tagged as a commute.",
2391
+ "type": "string"
2392
+ },
2393
+ {
2394
+ "name": "data_type",
2395
+ "in": "formData",
2396
+ "description": "The format of the uploaded file.",
2397
+ "type": "string",
2398
+ "enum": [
2399
+ "fit",
2400
+ "fit.gz",
2401
+ "tcx",
2402
+ "tcx.gz",
2403
+ "gpx",
2404
+ "gpx.gz"
2405
+ ]
2406
+ },
2407
+ {
2408
+ "name": "external_id",
2409
+ "in": "formData",
2410
+ "description": "The desired external identifier of the resulting activity.",
2411
+ "type": "string"
2412
+ }
2413
+ ],
2414
+ "tags": [
2415
+ "Uploads"
2416
+ ],
2417
+ "responses": {
2418
+ "201": {
2419
+ "description": "A representation of the created upload.",
2420
+ "schema": {
2421
+ "$ref": "#/definitions/Upload"
2422
+ }
2423
+ },
2424
+ "default": {
2425
+ "description": "Unexpected error.",
2426
+ "schema": {
2427
+ "$ref": "#/definitions/Fault"
2428
+ }
2429
+ }
2430
+ }
2431
+ }
2432
+ },
2433
+ "/uploads/{uploadId}": {
2434
+ "get": {
2435
+ "operationId": "getUploadById",
2436
+ "summary": "Get Upload",
2437
+ "description": "Returns an upload for a given identifier. Requires activity:write scope.",
2438
+ "parameters": [
2439
+ {
2440
+ "name": "uploadId",
2441
+ "in": "path",
2442
+ "description": "The identifier of the upload.",
2443
+ "required": true,
2444
+ "type": "integer",
2445
+ "format": "int64"
2446
+ }
2447
+ ],
2448
+ "tags": [
2449
+ "Uploads"
2450
+ ],
2451
+ "responses": {
2452
+ "200": {
2453
+ "description": "Representation of the upload.",
2454
+ "schema": {
2455
+ "$ref": "#/definitions/Upload"
2456
+ }
2457
+ },
2458
+ "default": {
2459
+ "description": "Unexpected error.",
2460
+ "schema": {
2461
+ "$ref": "#/definitions/Fault"
2462
+ }
2463
+ }
2464
+ }
2465
+ }
2466
+ },
2467
+ "/activities/{id}/streams": {
2468
+ "get": {
2469
+ "operationId": "getActivityStreams",
2470
+ "summary": "Get Activity Streams",
2471
+ "description": "Returns the given activity's streams. Requires activity:read scope. Requires activity:read_all scope for Only Me activities.",
2472
+ "parameters": [
2473
+ {
2474
+ "name": "id",
2475
+ "in": "path",
2476
+ "description": "The identifier of the activity.",
2477
+ "required": true,
2478
+ "type": "integer",
2479
+ "format": "int64"
2480
+ },
2481
+ {
2482
+ "name": "keys",
2483
+ "in": "query",
2484
+ "description": "Desired stream types.",
2485
+ "required": true,
2486
+ "type": "array",
2487
+ "items": {
2488
+ "type": "string",
2489
+ "enum": [
2490
+ "time",
2491
+ "distance",
2492
+ "latlng",
2493
+ "altitude",
2494
+ "velocity_smooth",
2495
+ "heartrate",
2496
+ "cadence",
2497
+ "watts",
2498
+ "temp",
2499
+ "moving",
2500
+ "grade_smooth"
2501
+ ]
2502
+ },
2503
+ "collectionFormat": "csv",
2504
+ "minItems": 1
2505
+ },
2506
+ {
2507
+ "name": "key_by_type",
2508
+ "in": "query",
2509
+ "description": "Must be true.",
2510
+ "type": "boolean",
2511
+ "required": true,
2512
+ "default": true
2513
+ }
2514
+ ],
2515
+ "tags": [
2516
+ "Streams"
2517
+ ],
2518
+ "responses": {
2519
+ "200": {
2520
+ "description": "The set of requested streams.",
2521
+ "schema": {
2522
+ "$ref": "#/definitions/StreamSet"
2523
+ },
2524
+ "examples": {
2525
+ "application/json": [
2526
+ {
2527
+ "type": "distance",
2528
+ "data": [
2529
+ 2.9,
2530
+ 5.8,
2531
+ 8.5,
2532
+ 11.7,
2533
+ 15,
2534
+ 19,
2535
+ 23.2,
2536
+ 28,
2537
+ 32.8,
2538
+ 38.1,
2539
+ 43.8,
2540
+ 49.5
2541
+ ],
2542
+ "series_type": "distance",
2543
+ "original_size": 12,
2544
+ "resolution": "high"
2545
+ }
2546
+ ]
2547
+ }
2548
+ },
2549
+ "default": {
2550
+ "description": "Unexpected error.",
2551
+ "schema": {
2552
+ "$ref": "#/definitions/Fault"
2553
+ }
2554
+ }
2555
+ }
2556
+ }
2557
+ },
2558
+ "/segment_efforts/{id}/streams": {
2559
+ "get": {
2560
+ "operationId": "getSegmentEffortStreams",
2561
+ "summary": "Get Segment Effort Streams",
2562
+ "description": "Returns a set of streams for a segment effort completed by the authenticated athlete. Requires read_all scope.",
2563
+ "parameters": [
2564
+ {
2565
+ "name": "id",
2566
+ "in": "path",
2567
+ "description": "The identifier of the segment effort.",
2568
+ "required": true,
2569
+ "type": "integer",
2570
+ "format": "int64"
2571
+ },
2572
+ {
2573
+ "name": "keys",
2574
+ "in": "query",
2575
+ "description": "The types of streams to return.",
2576
+ "required": true,
2577
+ "type": "array",
2578
+ "items": {
2579
+ "type": "string",
2580
+ "enum": [
2581
+ "time",
2582
+ "distance",
2583
+ "latlng",
2584
+ "altitude",
2585
+ "velocity_smooth",
2586
+ "heartrate",
2587
+ "cadence",
2588
+ "watts",
2589
+ "temp",
2590
+ "moving",
2591
+ "grade_smooth"
2592
+ ]
2593
+ },
2594
+ "collectionFormat": "csv",
2595
+ "minItems": 1
2596
+ },
2597
+ {
2598
+ "name": "key_by_type",
2599
+ "in": "query",
2600
+ "description": "Must be true.",
2601
+ "type": "boolean",
2602
+ "required": true,
2603
+ "default": true
2604
+ }
2605
+ ],
2606
+ "tags": [
2607
+ "Streams"
2608
+ ],
2609
+ "responses": {
2610
+ "200": {
2611
+ "description": "The set of requested streams.",
2612
+ "schema": {
2613
+ "$ref": "#/definitions/StreamSet"
2614
+ },
2615
+ "examples": {
2616
+ "application/json": [
2617
+ {
2618
+ "type": "distance",
2619
+ "data": [
2620
+ 904.5,
2621
+ 957.8,
2622
+ 963.1,
2623
+ 989.1,
2624
+ 1011.9,
2625
+ 1049.7,
2626
+ 1082.4,
2627
+ 1098.1,
2628
+ 1113.2,
2629
+ 1124.7,
2630
+ 1139.2,
2631
+ 1142.1,
2632
+ 1170.4,
2633
+ 1173
2634
+ ],
2635
+ "series_type": "distance",
2636
+ "original_size": 14,
2637
+ "resolution": "high"
2638
+ }
2639
+ ]
2640
+ }
2641
+ },
2642
+ "default": {
2643
+ "description": "Unexpected error.",
2644
+ "schema": {
2645
+ "$ref": "#/definitions/Fault"
2646
+ }
2647
+ }
2648
+ }
2649
+ }
2650
+ },
2651
+ "/segments/{id}/streams": {
2652
+ "get": {
2653
+ "operationId": "getSegmentStreams",
2654
+ "summary": "Get Segment Streams",
2655
+ "description": "Returns the given segment's streams. Requires read_all scope for private segments.",
2656
+ "parameters": [
2657
+ {
2658
+ "name": "id",
2659
+ "in": "path",
2660
+ "description": "The identifier of the segment.",
2661
+ "required": true,
2662
+ "type": "integer",
2663
+ "format": "int64"
2664
+ },
2665
+ {
2666
+ "name": "keys",
2667
+ "in": "query",
2668
+ "description": "The types of streams to return.",
2669
+ "required": true,
2670
+ "type": "array",
2671
+ "items": {
2672
+ "type": "string",
2673
+ "enum": [
2674
+ "distance",
2675
+ "latlng",
2676
+ "altitude"
2677
+ ]
2678
+ },
2679
+ "collectionFormat": "csv",
2680
+ "minItems": 1
2681
+ },
2682
+ {
2683
+ "name": "key_by_type",
2684
+ "in": "query",
2685
+ "description": "Must be true.",
2686
+ "type": "boolean",
2687
+ "required": true,
2688
+ "default": true
2689
+ }
2690
+ ],
2691
+ "tags": [
2692
+ "Streams"
2693
+ ],
2694
+ "responses": {
2695
+ "200": {
2696
+ "description": "The set of requested streams.",
2697
+ "schema": {
2698
+ "$ref": "#/definitions/StreamSet"
2699
+ },
2700
+ "examples": {
2701
+ "application/json": [
2702
+ {
2703
+ "type": "latlng",
2704
+ "data": [
2705
+ [
2706
+ 37.833112,
2707
+ -122.483436
2708
+ ],
2709
+ [
2710
+ 37.832964,
2711
+ -122.483406
2712
+ ]
2713
+ ],
2714
+ "series_type": "distance",
2715
+ "original_size": 2,
2716
+ "resolution": "high"
2717
+ },
2718
+ {
2719
+ "type": "distance",
2720
+ "data": [
2721
+ 0,
2722
+ 16.8
2723
+ ],
2724
+ "series_type": "distance",
2725
+ "original_size": 2,
2726
+ "resolution": "high"
2727
+ },
2728
+ {
2729
+ "type": "altitude",
2730
+ "data": [
2731
+ 92.4,
2732
+ 93.4
2733
+ ],
2734
+ "series_type": "distance",
2735
+ "original_size": 2,
2736
+ "resolution": "high"
2737
+ }
2738
+ ]
2739
+ }
2740
+ },
2741
+ "default": {
2742
+ "description": "Unexpected error.",
2743
+ "schema": {
2744
+ "$ref": "#/definitions/Fault"
2745
+ }
2746
+ }
2747
+ }
2748
+ }
2749
+ },
2750
+ "/routes/{id}/streams": {
2751
+ "get": {
2752
+ "operationId": "getRouteStreams",
2753
+ "summary": "Get Route Streams",
2754
+ "description": "Returns the given route's streams. Requires read_all scope for private routes.",
2755
+ "parameters": [
2756
+ {
2757
+ "name": "id",
2758
+ "in": "path",
2759
+ "description": "The identifier of the route.",
2760
+ "required": true,
2761
+ "type": "integer",
2762
+ "format": "int64"
2763
+ }
2764
+ ],
2765
+ "tags": [
2766
+ "Streams"
2767
+ ],
2768
+ "responses": {
2769
+ "200": {
2770
+ "description": "The set of requested streams.",
2771
+ "schema": {
2772
+ "$ref": "#/definitions/StreamSet"
2773
+ },
2774
+ "examples": {
2775
+ "application/json": [
2776
+ {
2777
+ "type": "latlng",
2778
+ "data": [
2779
+ [
2780
+ 37.833112,
2781
+ -122.483436
2782
+ ],
2783
+ [
2784
+ 37.832964,
2785
+ -122.483406
2786
+ ]
2787
+ ]
2788
+ },
2789
+ {
2790
+ "type": "distance",
2791
+ "data": [
2792
+ 0,
2793
+ 16.8
2794
+ ]
2795
+ },
2796
+ {
2797
+ "type": "altitude",
2798
+ "data": [
2799
+ 92.4,
2800
+ 93.4
2801
+ ]
2802
+ }
2803
+ ]
2804
+ }
2805
+ },
2806
+ "default": {
2807
+ "description": "Unexpected error.",
2808
+ "schema": {
2809
+ "$ref": "#/definitions/Fault"
2810
+ }
2811
+ }
2812
+ }
2813
+ }
2814
+ }
2815
+ },
2816
+ "definitions": {
2817
+ "Error": {
2818
+ "type": "object",
2819
+ "properties": {
2820
+ "code": {
2821
+ "description": "The code associated with this error.",
2822
+ "type": "string"
2823
+ },
2824
+ "field": {
2825
+ "description": "The specific field or aspect of the resource associated with this error.",
2826
+ "type": "string"
2827
+ },
2828
+ "resource": {
2829
+ "description": "The type of resource associated with this error.",
2830
+ "type": "string"
2831
+ }
2832
+ }
2833
+ },
2834
+ "Fault": {
2835
+ "description": "Encapsulates the errors that may be returned from the API.",
2836
+ "type": "object",
2837
+ "properties": {
2838
+ "errors": {
2839
+ "type": "array",
2840
+ "items": {
2841
+ "$ref": "#/definitions/Error"
2842
+ },
2843
+ "description": "The set of specific errors associated with this fault, if any."
2844
+ },
2845
+ "message": {
2846
+ "type": "string",
2847
+ "description": "The message of the fault."
2848
+ }
2849
+ }
2850
+ },
2851
+ "ActivityTotal": {
2852
+ "type": "object",
2853
+ "description": "A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.",
2854
+ "properties": {
2855
+ "count": {
2856
+ "type": "integer",
2857
+ "description": "The number of activities considered in this total."
2858
+ },
2859
+ "distance": {
2860
+ "type": "number",
2861
+ "format": "float",
2862
+ "description": "The total distance covered by the considered activities."
2863
+ },
2864
+ "moving_time": {
2865
+ "type": "integer",
2866
+ "description": "The total moving time of the considered activities."
2867
+ },
2868
+ "elapsed_time": {
2869
+ "type": "integer",
2870
+ "description": "The total elapsed time of the considered activities."
2871
+ },
2872
+ "elevation_gain": {
2873
+ "type": "number",
2874
+ "format": "float",
2875
+ "description": "The total elevation gain of the considered activities."
2876
+ },
2877
+ "achievement_count": {
2878
+ "type": "integer",
2879
+ "description": "The total number of achievements of the considered activities."
2880
+ }
2881
+ }
2882
+ },
2883
+ "ActivityStats": {
2884
+ "description": "A set of rolled-up statistics and totals for an athlete",
2885
+ "properties": {
2886
+ "biggest_ride_distance": {
2887
+ "type": "number",
2888
+ "format": "double",
2889
+ "description": "The longest distance ridden by the athlete."
2890
+ },
2891
+ "biggest_climb_elevation_gain": {
2892
+ "type": "number",
2893
+ "format": "double",
2894
+ "description": "The highest climb ridden by the athlete."
2895
+ },
2896
+ "recent_ride_totals": {
2897
+ "description": "The recent (last 4 weeks) ride stats for the athlete.",
2898
+ "$ref": "#/definitions/ActivityTotal"
2899
+ },
2900
+ "recent_run_totals": {
2901
+ "description": "The recent (last 4 weeks) run stats for the athlete.",
2902
+ "$ref": "#/definitions/ActivityTotal"
2903
+ },
2904
+ "recent_swim_totals": {
2905
+ "description": "The recent (last 4 weeks) swim stats for the athlete.",
2906
+ "$ref": "#/definitions/ActivityTotal"
2907
+ },
2908
+ "ytd_ride_totals": {
2909
+ "description": "The year to date ride stats for the athlete.",
2910
+ "$ref": "#/definitions/ActivityTotal"
2911
+ },
2912
+ "ytd_run_totals": {
2913
+ "description": "The year to date run stats for the athlete.",
2914
+ "$ref": "#/definitions/ActivityTotal"
2915
+ },
2916
+ "ytd_swim_totals": {
2917
+ "description": "The year to date swim stats for the athlete.",
2918
+ "$ref": "#/definitions/ActivityTotal"
2919
+ },
2920
+ "all_ride_totals": {
2921
+ "description": "The all time ride stats for the athlete.",
2922
+ "$ref": "#/definitions/ActivityTotal"
2923
+ },
2924
+ "all_run_totals": {
2925
+ "description": "The all time run stats for the athlete.",
2926
+ "$ref": "#/definitions/ActivityTotal"
2927
+ },
2928
+ "all_swim_totals": {
2929
+ "description": "The all time swim stats for the athlete.",
2930
+ "$ref": "#/definitions/ActivityTotal"
2931
+ }
2932
+ }
2933
+ },
2934
+ "MetaAthlete": {
2935
+ "type": "object",
2936
+ "properties": {
2937
+ "id": {
2938
+ "type": "integer",
2939
+ "format": "int64",
2940
+ "description": "The unique identifier of the athlete"
2941
+ }
2942
+ }
2943
+ },
2944
+ "SummaryAthlete": {
2945
+ "allOf": [
2946
+ {
2947
+ "$ref": "#/definitions/MetaAthlete"
2948
+ },
2949
+ {
2950
+ "properties": {
2951
+ "resource_state": {
2952
+ "type": "integer",
2953
+ "description": "Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\""
2954
+ },
2955
+ "firstname": {
2956
+ "type": "string",
2957
+ "description": "The athlete's first name."
2958
+ },
2959
+ "lastname": {
2960
+ "type": "string",
2961
+ "description": "The athlete's last name."
2962
+ },
2963
+ "profile_medium": {
2964
+ "type": "string",
2965
+ "description": "URL to a 62x62 pixel profile picture."
2966
+ },
2967
+ "profile": {
2968
+ "type": "string",
2969
+ "description": "URL to a 124x124 pixel profile picture."
2970
+ },
2971
+ "city": {
2972
+ "type": "string",
2973
+ "description": "The athlete's city."
2974
+ },
2975
+ "state": {
2976
+ "type": "string",
2977
+ "description": "The athlete's state or geographical region."
2978
+ },
2979
+ "country": {
2980
+ "type": "string",
2981
+ "description": "The athlete's country."
2982
+ },
2983
+ "sex": {
2984
+ "type": "string",
2985
+ "description": "The athlete's sex.",
2986
+ "enum": [
2987
+ "M",
2988
+ "F"
2989
+ ]
2990
+ },
2991
+ "premium": {
2992
+ "type": "boolean",
2993
+ "description": "Deprecated. Use summit field instead. Whether the athlete has any Summit subscription."
2994
+ },
2995
+ "summit": {
2996
+ "type": "boolean",
2997
+ "description": "Whether the athlete has any Summit subscription."
2998
+ },
2999
+ "created_at": {
3000
+ "type": "string",
3001
+ "format": "date-time",
3002
+ "description": "The time at which the athlete was created."
3003
+ },
3004
+ "updated_at": {
3005
+ "type": "string",
3006
+ "format": "date-time",
3007
+ "description": "The time at which the athlete was last updated."
3008
+ }
3009
+ }
3010
+ }
3011
+ ]
3012
+ },
3013
+ "MetaClub": {
3014
+ "type": "object",
3015
+ "properties": {
3016
+ "id": {
3017
+ "type": "integer",
3018
+ "format": "int64",
3019
+ "description": "The club's unique identifier."
3020
+ },
3021
+ "resource_state": {
3022
+ "type": "integer",
3023
+ "description": "Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\""
3024
+ },
3025
+ "name": {
3026
+ "type": "string",
3027
+ "description": "The club's name."
3028
+ }
3029
+ }
3030
+ },
3031
+ "ActivityType": {
3032
+ "type": "string",
3033
+ "enum": [
3034
+ "AlpineSki",
3035
+ "BackcountrySki",
3036
+ "Canoeing",
3037
+ "Crossfit",
3038
+ "EBikeRide",
3039
+ "Elliptical",
3040
+ "Golf",
3041
+ "Handcycle",
3042
+ "Hike",
3043
+ "IceSkate",
3044
+ "InlineSkate",
3045
+ "Kayaking",
3046
+ "Kitesurf",
3047
+ "NordicSki",
3048
+ "Ride",
3049
+ "RockClimbing",
3050
+ "RollerSki",
3051
+ "Rowing",
3052
+ "Run",
3053
+ "Sail",
3054
+ "Skateboard",
3055
+ "Snowboard",
3056
+ "Snowshoe",
3057
+ "Soccer",
3058
+ "StairStepper",
3059
+ "StandUpPaddling",
3060
+ "Surfing",
3061
+ "Swim",
3062
+ "Velomobile",
3063
+ "VirtualRide",
3064
+ "VirtualRun",
3065
+ "Walk",
3066
+ "WeightTraining",
3067
+ "Wheelchair",
3068
+ "Windsurf",
3069
+ "Workout",
3070
+ "Yoga"
3071
+ ],
3072
+ "description": "An enumeration of the types an activity may have. Note that this enumeration does not include new sport types (e.g. MountainBikeRide, EMountainBikeRide), activities with these sport types will have the corresponding activity type (e.g. Ride for MountainBikeRide, EBikeRide for EMountainBikeRide)"
3073
+ },
3074
+ "SummaryClub": {
3075
+ "allOf": [
3076
+ {
3077
+ "$ref": "#/definitions/MetaClub"
3078
+ },
3079
+ {
3080
+ "properties": {
3081
+ "profile_medium": {
3082
+ "type": "string",
3083
+ "description": "URL to a 60x60 pixel profile picture."
3084
+ },
3085
+ "cover_photo": {
3086
+ "type": "string",
3087
+ "description": "URL to a ~1185x580 pixel cover photo."
3088
+ },
3089
+ "cover_photo_small": {
3090
+ "type": "string",
3091
+ "description": "URL to a ~360x176 pixel cover photo."
3092
+ },
3093
+ "sport_type": {
3094
+ "type": "string",
3095
+ "enum": [
3096
+ "cycling",
3097
+ "running",
3098
+ "triathlon",
3099
+ "other"
3100
+ ],
3101
+ "description": "Deprecated. Prefer to use activity_types."
3102
+ },
3103
+ "activity_types": {
3104
+ "type": "array",
3105
+ "items": {
3106
+ "$ref": "#/definitions/ActivityType"
3107
+ },
3108
+ "description": "The activity types that count for a club. This takes precedence over sport_type."
3109
+ },
3110
+ "city": {
3111
+ "type": "string",
3112
+ "description": "The club's city."
3113
+ },
3114
+ "state": {
3115
+ "type": "string",
3116
+ "description": "The club's state or geographical region."
3117
+ },
3118
+ "country": {
3119
+ "type": "string",
3120
+ "description": "The club's country."
3121
+ },
3122
+ "private": {
3123
+ "type": "boolean",
3124
+ "description": "Whether the club is private."
3125
+ },
3126
+ "member_count": {
3127
+ "type": "integer",
3128
+ "description": "The club's member count."
3129
+ },
3130
+ "featured": {
3131
+ "type": "boolean",
3132
+ "description": "Whether the club is featured or not."
3133
+ },
3134
+ "verified": {
3135
+ "type": "boolean",
3136
+ "description": "Whether the club is verified or not."
3137
+ },
3138
+ "url": {
3139
+ "type": "string",
3140
+ "description": "The club's vanity URL."
3141
+ }
3142
+ }
3143
+ }
3144
+ ]
3145
+ },
3146
+ "SummaryGear": {
3147
+ "type": "object",
3148
+ "properties": {
3149
+ "id": {
3150
+ "type": "string",
3151
+ "description": "The gear's unique identifier."
3152
+ },
3153
+ "resource_state": {
3154
+ "type": "integer",
3155
+ "description": "Resource state, indicates level of detail. Possible values: 2 -> \"summary\", 3 -> \"detail\""
3156
+ },
3157
+ "primary": {
3158
+ "type": "boolean",
3159
+ "description": "Whether this gear's is the owner's default one."
3160
+ },
3161
+ "name": {
3162
+ "type": "string",
3163
+ "description": "The gear's name."
3164
+ },
3165
+ "distance": {
3166
+ "type": "number",
3167
+ "format": "float",
3168
+ "description": "The distance logged with this gear."
3169
+ }
3170
+ }
3171
+ },
3172
+ "DetailedAthlete": {
3173
+ "allOf": [
3174
+ {
3175
+ "$ref": "#/definitions/SummaryAthlete"
3176
+ },
3177
+ {
3178
+ "properties": {
3179
+ "follower_count": {
3180
+ "type": "integer",
3181
+ "description": "The athlete's follower count."
3182
+ },
3183
+ "friend_count": {
3184
+ "type": "integer",
3185
+ "description": "The athlete's friend count."
3186
+ },
3187
+ "measurement_preference": {
3188
+ "type": "string",
3189
+ "enum": [
3190
+ "feet",
3191
+ "meters"
3192
+ ],
3193
+ "description": "The athlete's preferred unit system."
3194
+ },
3195
+ "ftp": {
3196
+ "type": "integer",
3197
+ "description": "The athlete's FTP (Functional Threshold Power)."
3198
+ },
3199
+ "weight": {
3200
+ "type": "number",
3201
+ "format": "float",
3202
+ "description": "The athlete's weight."
3203
+ },
3204
+ "clubs": {
3205
+ "type": "array",
3206
+ "items": {
3207
+ "$ref": "#/definitions/SummaryClub"
3208
+ },
3209
+ "description": "The athlete's clubs."
3210
+ },
3211
+ "bikes": {
3212
+ "type": "array",
3213
+ "items": {
3214
+ "$ref": "#/definitions/SummaryGear"
3215
+ },
3216
+ "description": "The athlete's bikes."
3217
+ },
3218
+ "shoes": {
3219
+ "type": "array",
3220
+ "items": {
3221
+ "$ref": "#/definitions/SummaryGear"
3222
+ },
3223
+ "description": "The athlete's shoes."
3224
+ }
3225
+ }
3226
+ }
3227
+ ]
3228
+ },
3229
+ "ZoneRange": {
3230
+ "type": "object",
3231
+ "properties": {
3232
+ "min": {
3233
+ "type": "integer",
3234
+ "description": "The minimum value in the range."
3235
+ },
3236
+ "max": {
3237
+ "type": "integer",
3238
+ "description": "The maximum value in the range."
3239
+ }
3240
+ }
3241
+ },
3242
+ "ZoneRanges": {
3243
+ "type": "array",
3244
+ "items": {
3245
+ "$ref": "#/definitions/ZoneRange"
3246
+ }
3247
+ },
3248
+ "HeartRateZoneRanges": {
3249
+ "type": "object",
3250
+ "properties": {
3251
+ "custom_zones": {
3252
+ "type": "boolean",
3253
+ "description": "Whether the athlete has set their own custom heart rate zones"
3254
+ },
3255
+ "zones": {
3256
+ "$ref": "#/definitions/ZoneRanges"
3257
+ }
3258
+ }
3259
+ },
3260
+ "PowerZoneRanges": {
3261
+ "type": "object",
3262
+ "properties": {
3263
+ "zones": {
3264
+ "$ref": "#/definitions/ZoneRanges"
3265
+ }
3266
+ }
3267
+ },
3268
+ "Zones": {
3269
+ "type": "object",
3270
+ "properties": {
3271
+ "heart_rate": {
3272
+ "$ref": "#/definitions/HeartRateZoneRanges"
3273
+ },
3274
+ "power": {
3275
+ "$ref": "#/definitions/PowerZoneRanges"
3276
+ }
3277
+ }
3278
+ },
3279
+ "LatLng": {
3280
+ "type": "array",
3281
+ "items": {
3282
+ "type": "number",
3283
+ "format": "float"
3284
+ },
3285
+ "minItems": 2,
3286
+ "maxItems": 2,
3287
+ "description": "A pair of latitude/longitude coordinates, represented as an array of 2 floating point numbers."
3288
+ },
3289
+ "SummaryPRSegmentEffort": {
3290
+ "type": "object",
3291
+ "properties": {
3292
+ "pr_activity_id": {
3293
+ "type": "integer",
3294
+ "format": "int64",
3295
+ "description": "The unique identifier of the activity related to the PR effort."
3296
+ },
3297
+ "pr_elapsed_time": {
3298
+ "type": "integer",
3299
+ "description": "The elapsed time ot the PR effort."
3300
+ },
3301
+ "pr_date": {
3302
+ "type": "string",
3303
+ "format": "date-time",
3304
+ "description": "The time at which the PR effort was started."
3305
+ },
3306
+ "effort_count": {
3307
+ "type": "integer",
3308
+ "description": "Number of efforts by the authenticated athlete on this segment."
3309
+ }
3310
+ }
3311
+ },
3312
+ "SummarySegmentEffort": {
3313
+ "type": "object",
3314
+ "properties": {
3315
+ "id": {
3316
+ "type": "integer",
3317
+ "format": "int64",
3318
+ "description": "The unique identifier of this effort"
3319
+ },
3320
+ "activity_id": {
3321
+ "type": "integer",
3322
+ "format": "int64",
3323
+ "description": "The unique identifier of the activity related to this effort"
3324
+ },
3325
+ "elapsed_time": {
3326
+ "type": "integer",
3327
+ "description": "The effort's elapsed time"
3328
+ },
3329
+ "start_date": {
3330
+ "type": "string",
3331
+ "format": "date-time",
3332
+ "description": "The time at which the effort was started."
3333
+ },
3334
+ "start_date_local": {
3335
+ "type": "string",
3336
+ "format": "date-time",
3337
+ "description": "The time at which the effort was started in the local timezone."
3338
+ },
3339
+ "distance": {
3340
+ "type": "number",
3341
+ "format": "float",
3342
+ "description": "The effort's distance in meters"
3343
+ },
3344
+ "is_kom": {
3345
+ "type": "boolean",
3346
+ "description": "Whether this effort is the current best on the leaderboard"
3347
+ }
3348
+ }
3349
+ },
3350
+ "SummarySegment": {
3351
+ "type": "object",
3352
+ "properties": {
3353
+ "id": {
3354
+ "type": "integer",
3355
+ "format": "int64",
3356
+ "description": "The unique identifier of this segment"
3357
+ },
3358
+ "name": {
3359
+ "type": "string",
3360
+ "description": "The name of this segment"
3361
+ },
3362
+ "activity_type": {
3363
+ "type": "string",
3364
+ "enum": [
3365
+ "Ride",
3366
+ "Run"
3367
+ ]
3368
+ },
3369
+ "distance": {
3370
+ "type": "number",
3371
+ "format": "float",
3372
+ "description": "The segment's distance, in meters"
3373
+ },
3374
+ "average_grade": {
3375
+ "type": "number",
3376
+ "format": "float",
3377
+ "description": "The segment's average grade, in percents"
3378
+ },
3379
+ "maximum_grade": {
3380
+ "type": "number",
3381
+ "format": "float",
3382
+ "description": "The segments's maximum grade, in percents"
3383
+ },
3384
+ "elevation_high": {
3385
+ "type": "number",
3386
+ "format": "float",
3387
+ "description": "The segments's highest elevation, in meters"
3388
+ },
3389
+ "elevation_low": {
3390
+ "type": "number",
3391
+ "format": "float",
3392
+ "description": "The segments's lowest elevation, in meters"
3393
+ },
3394
+ "start_latlng": {
3395
+ "$ref": "#/definitions/LatLng"
3396
+ },
3397
+ "end_latlng": {
3398
+ "$ref": "#/definitions/LatLng"
3399
+ },
3400
+ "climb_category": {
3401
+ "type": "integer",
3402
+ "description": "The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category."
3403
+ },
3404
+ "city": {
3405
+ "type": "string",
3406
+ "description": "The segments's city."
3407
+ },
3408
+ "state": {
3409
+ "type": "string",
3410
+ "description": "The segments's state or geographical region."
3411
+ },
3412
+ "country": {
3413
+ "type": "string",
3414
+ "description": "The segment's country."
3415
+ },
3416
+ "private": {
3417
+ "type": "boolean",
3418
+ "description": "Whether this segment is private."
3419
+ },
3420
+ "athlete_pr_effort": {
3421
+ "$ref": "#/definitions/SummaryPRSegmentEffort"
3422
+ },
3423
+ "athlete_segment_stats": {
3424
+ "$ref": "#/definitions/SummarySegmentEffort"
3425
+ }
3426
+ }
3427
+ },
3428
+ "PolylineMap": {
3429
+ "type": "object",
3430
+ "properties": {
3431
+ "id": {
3432
+ "type": "string",
3433
+ "description": "The identifier of the map"
3434
+ },
3435
+ "polyline": {
3436
+ "type": "string",
3437
+ "description": "The polyline of the map, only returned on detailed representation of an object"
3438
+ },
3439
+ "summary_polyline": {
3440
+ "type": "string",
3441
+ "description": "The summary polyline of the map"
3442
+ }
3443
+ }
3444
+ },
3445
+ "DetailedSegment": {
3446
+ "allOf": [
3447
+ {
3448
+ "$ref": "#/definitions/SummarySegment"
3449
+ },
3450
+ {
3451
+ "properties": {
3452
+ "created_at": {
3453
+ "type": "string",
3454
+ "format": "date-time",
3455
+ "description": "The time at which the segment was created."
3456
+ },
3457
+ "updated_at": {
3458
+ "type": "string",
3459
+ "format": "date-time",
3460
+ "description": "The time at which the segment was last updated."
3461
+ },
3462
+ "total_elevation_gain": {
3463
+ "type": "number",
3464
+ "format": "float",
3465
+ "description": "The segment's total elevation gain."
3466
+ },
3467
+ "map": {
3468
+ "$ref": "#/definitions/PolylineMap"
3469
+ },
3470
+ "effort_count": {
3471
+ "type": "integer",
3472
+ "description": "The total number of efforts for this segment"
3473
+ },
3474
+ "athlete_count": {
3475
+ "type": "integer",
3476
+ "description": "The number of unique athletes who have an effort for this segment"
3477
+ },
3478
+ "hazardous": {
3479
+ "type": "boolean",
3480
+ "description": "Whether this segment is considered hazardous"
3481
+ },
3482
+ "star_count": {
3483
+ "type": "integer",
3484
+ "description": "The number of stars for this segment"
3485
+ }
3486
+ }
3487
+ }
3488
+ ]
3489
+ },
3490
+ "MetaActivity": {
3491
+ "type": "object",
3492
+ "properties": {
3493
+ "id": {
3494
+ "type": "integer",
3495
+ "format": "int64",
3496
+ "description": "The unique identifier of the activity"
3497
+ }
3498
+ }
3499
+ },
3500
+ "DetailedSegmentEffort": {
3501
+ "allOf": [
3502
+ {
3503
+ "$ref": "#/definitions/SummarySegmentEffort"
3504
+ },
3505
+ {
3506
+ "properties": {
3507
+ "name": {
3508
+ "type": "string",
3509
+ "description": "The name of the segment on which this effort was performed"
3510
+ },
3511
+ "activity": {
3512
+ "$ref": "#/definitions/MetaActivity"
3513
+ },
3514
+ "athlete": {
3515
+ "$ref": "#/definitions/MetaAthlete"
3516
+ },
3517
+ "moving_time": {
3518
+ "type": "integer",
3519
+ "description": "The effort's moving time"
3520
+ },
3521
+ "start_index": {
3522
+ "type": "integer",
3523
+ "description": "The start index of this effort in its activity's stream"
3524
+ },
3525
+ "end_index": {
3526
+ "type": "integer",
3527
+ "description": "The end index of this effort in its activity's stream"
3528
+ },
3529
+ "average_cadence": {
3530
+ "type": "number",
3531
+ "format": "float",
3532
+ "description": "The effort's average cadence"
3533
+ },
3534
+ "average_watts": {
3535
+ "type": "number",
3536
+ "format": "float",
3537
+ "description": "The average wattage of this effort"
3538
+ },
3539
+ "device_watts": {
3540
+ "type": "boolean",
3541
+ "description": "For riding efforts, whether the wattage was reported by a dedicated recording device"
3542
+ },
3543
+ "average_heartrate": {
3544
+ "type": "number",
3545
+ "format": "float",
3546
+ "description": "The heart heart rate of the athlete during this effort"
3547
+ },
3548
+ "max_heartrate": {
3549
+ "type": "number",
3550
+ "format": "float",
3551
+ "description": "The maximum heart rate of the athlete during this effort"
3552
+ },
3553
+ "segment": {
3554
+ "$ref": "#/definitions/SummarySegment"
3555
+ },
3556
+ "kom_rank": {
3557
+ "type": "integer",
3558
+ "description": "The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload",
3559
+ "minimum": 1,
3560
+ "maximum": 10
3561
+ },
3562
+ "pr_rank": {
3563
+ "type": "integer",
3564
+ "description": "The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload",
3565
+ "minimum": 1,
3566
+ "maximum": 3
3567
+ },
3568
+ "hidden": {
3569
+ "type": "boolean",
3570
+ "description": "Whether this effort should be hidden when viewed within an activity"
3571
+ }
3572
+ }
3573
+ }
3574
+ ]
3575
+ },
3576
+ "ExplorerSegment": {
3577
+ "type": "object",
3578
+ "properties": {
3579
+ "id": {
3580
+ "type": "integer",
3581
+ "format": "int64",
3582
+ "description": "The unique identifier of this segment"
3583
+ },
3584
+ "name": {
3585
+ "type": "string",
3586
+ "description": "The name of this segment"
3587
+ },
3588
+ "climb_category": {
3589
+ "type": "integer",
3590
+ "description": "The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catégorie, 0 is uncategorized in climb_category. If climb_category = 5, climb_category_desc = HC. If climb_category = 2, climb_category_desc = 3.",
3591
+ "minimum": 0,
3592
+ "maximum": 5
3593
+ },
3594
+ "climb_category_desc": {
3595
+ "type": "string",
3596
+ "description": "The description for the category of the climb",
3597
+ "enum": [
3598
+ "NC",
3599
+ "4",
3600
+ "3",
3601
+ "2",
3602
+ "1",
3603
+ "HC"
3604
+ ]
3605
+ },
3606
+ "avg_grade": {
3607
+ "type": "number",
3608
+ "format": "float",
3609
+ "description": "The segment's average grade, in percents"
3610
+ },
3611
+ "start_latlng": {
3612
+ "$ref": "#/definitions/LatLng"
3613
+ },
3614
+ "end_latlng": {
3615
+ "$ref": "#/definitions/LatLng"
3616
+ },
3617
+ "elev_difference": {
3618
+ "type": "number",
3619
+ "format": "float",
3620
+ "description": "The segments's evelation difference, in meters"
3621
+ },
3622
+ "distance": {
3623
+ "type": "number",
3624
+ "format": "float",
3625
+ "description": "The segment's distance, in meters"
3626
+ },
3627
+ "points": {
3628
+ "type": "string",
3629
+ "description": "The polyline of the segment"
3630
+ }
3631
+ }
3632
+ },
3633
+ "ExplorerResponse": {
3634
+ "type": "object",
3635
+ "properties": {
3636
+ "segments": {
3637
+ "type": "array",
3638
+ "items": {
3639
+ "$ref": "#/definitions/ExplorerSegment"
3640
+ },
3641
+ "description": "The set of segments matching an explorer request"
3642
+ }
3643
+ }
3644
+ },
3645
+ "SportType": {
3646
+ "type": "string",
3647
+ "enum": [
3648
+ "AlpineSki",
3649
+ "BackcountrySki",
3650
+ "Badminton",
3651
+ "Canoeing",
3652
+ "Crossfit",
3653
+ "EBikeRide",
3654
+ "Elliptical",
3655
+ "EMountainBikeRide",
3656
+ "Golf",
3657
+ "GravelRide",
3658
+ "Handcycle",
3659
+ "HighIntensityIntervalTraining",
3660
+ "Hike",
3661
+ "IceSkate",
3662
+ "InlineSkate",
3663
+ "Kayaking",
3664
+ "Kitesurf",
3665
+ "MountainBikeRide",
3666
+ "NordicSki",
3667
+ "Pickleball",
3668
+ "Pilates",
3669
+ "Racquetball",
3670
+ "Ride",
3671
+ "RockClimbing",
3672
+ "RollerSki",
3673
+ "Rowing",
3674
+ "Run",
3675
+ "Sail",
3676
+ "Skateboard",
3677
+ "Snowboard",
3678
+ "Snowshoe",
3679
+ "Soccer",
3680
+ "Squash",
3681
+ "StairStepper",
3682
+ "StandUpPaddling",
3683
+ "Surfing",
3684
+ "Swim",
3685
+ "TableTennis",
3686
+ "Tennis",
3687
+ "TrailRun",
3688
+ "Velomobile",
3689
+ "VirtualRide",
3690
+ "VirtualRow",
3691
+ "VirtualRun",
3692
+ "Walk",
3693
+ "WeightTraining",
3694
+ "Wheelchair",
3695
+ "Windsurf",
3696
+ "Workout",
3697
+ "Yoga"
3698
+ ],
3699
+ "description": "An enumeration of the sport types an activity may have. Distinct from ActivityType in that it has new types (e.g. MountainBikeRide)"
3700
+ },
3701
+ "SummaryActivity": {
3702
+ "allOf": [
3703
+ {
3704
+ "$ref": "#/definitions/MetaActivity"
3705
+ },
3706
+ {
3707
+ "properties": {
3708
+ "external_id": {
3709
+ "type": "string",
3710
+ "description": "The identifier provided at upload time"
3711
+ },
3712
+ "upload_id": {
3713
+ "type": "integer",
3714
+ "format": "int64",
3715
+ "description": "The identifier of the upload that resulted in this activity"
3716
+ },
3717
+ "athlete": {
3718
+ "$ref": "#/definitions/MetaAthlete"
3719
+ },
3720
+ "name": {
3721
+ "type": "string",
3722
+ "description": "The name of the activity"
3723
+ },
3724
+ "distance": {
3725
+ "type": "number",
3726
+ "format": "float",
3727
+ "description": "The activity's distance, in meters"
3728
+ },
3729
+ "moving_time": {
3730
+ "type": "integer",
3731
+ "description": "The activity's moving time, in seconds"
3732
+ },
3733
+ "elapsed_time": {
3734
+ "type": "integer",
3735
+ "description": "The activity's elapsed time, in seconds"
3736
+ },
3737
+ "total_elevation_gain": {
3738
+ "type": "number",
3739
+ "format": "float",
3740
+ "description": "The activity's total elevation gain."
3741
+ },
3742
+ "elev_high": {
3743
+ "type": "number",
3744
+ "format": "float",
3745
+ "description": "The activity's highest elevation, in meters"
3746
+ },
3747
+ "elev_low": {
3748
+ "type": "number",
3749
+ "format": "float",
3750
+ "description": "The activity's lowest elevation, in meters"
3751
+ },
3752
+ "type": {
3753
+ "$ref": "#/definitions/ActivityType",
3754
+ "description": "Deprecated. Prefer to use sport_type"
3755
+ },
3756
+ "sport_type": {
3757
+ "$ref": "#/definitions/SportType"
3758
+ },
3759
+ "start_date": {
3760
+ "type": "string",
3761
+ "format": "date-time",
3762
+ "description": "The time at which the activity was started."
3763
+ },
3764
+ "start_date_local": {
3765
+ "type": "string",
3766
+ "format": "date-time",
3767
+ "description": "The time at which the activity was started in the local timezone."
3768
+ },
3769
+ "timezone": {
3770
+ "type": "string",
3771
+ "description": "The timezone of the activity"
3772
+ },
3773
+ "start_latlng": {
3774
+ "$ref": "#/definitions/LatLng"
3775
+ },
3776
+ "end_latlng": {
3777
+ "$ref": "#/definitions/LatLng"
3778
+ },
3779
+ "achievement_count": {
3780
+ "type": "integer",
3781
+ "description": "The number of achievements gained during this activity"
3782
+ },
3783
+ "kudos_count": {
3784
+ "type": "integer",
3785
+ "description": "The number of kudos given for this activity"
3786
+ },
3787
+ "comment_count": {
3788
+ "type": "integer",
3789
+ "description": "The number of comments for this activity"
3790
+ },
3791
+ "athlete_count": {
3792
+ "type": "integer",
3793
+ "description": "The number of athletes for taking part in a group activity",
3794
+ "minimum": 1
3795
+ },
3796
+ "photo_count": {
3797
+ "type": "integer",
3798
+ "description": "The number of Instagram photos for this activity"
3799
+ },
3800
+ "total_photo_count": {
3801
+ "type": "integer",
3802
+ "description": "The number of Instagram and Strava photos for this activity"
3803
+ },
3804
+ "map": {
3805
+ "$ref": "#/definitions/PolylineMap"
3806
+ },
3807
+ "device_name": {
3808
+ "type": "string",
3809
+ "description": "The name of the device used to record the activity"
3810
+ },
3811
+ "trainer": {
3812
+ "type": "boolean",
3813
+ "description": "Whether this activity was recorded on a training machine"
3814
+ },
3815
+ "commute": {
3816
+ "type": "boolean",
3817
+ "description": "Whether this activity is a commute"
3818
+ },
3819
+ "manual": {
3820
+ "type": "boolean",
3821
+ "description": "Whether this activity was created manually"
3822
+ },
3823
+ "private": {
3824
+ "type": "boolean",
3825
+ "description": "Whether this activity is private"
3826
+ },
3827
+ "flagged": {
3828
+ "type": "boolean",
3829
+ "description": "Whether this activity is flagged"
3830
+ },
3831
+ "workout_type": {
3832
+ "type": "integer",
3833
+ "description": "The activity's workout type"
3834
+ },
3835
+ "upload_id_str": {
3836
+ "type": "string",
3837
+ "description": "The unique identifier of the upload in string format"
3838
+ },
3839
+ "average_speed": {
3840
+ "type": "number",
3841
+ "format": "float",
3842
+ "description": "The activity's average speed, in meters per second"
3843
+ },
3844
+ "max_speed": {
3845
+ "type": "number",
3846
+ "format": "float",
3847
+ "description": "The activity's max speed, in meters per second"
3848
+ },
3849
+ "has_kudoed": {
3850
+ "type": "boolean",
3851
+ "description": "Whether the logged-in athlete has kudoed this activity"
3852
+ },
3853
+ "hide_from_home": {
3854
+ "type": "boolean",
3855
+ "description": "Whether the activity is muted"
3856
+ },
3857
+ "gear_id": {
3858
+ "type": "string",
3859
+ "description": "The id of the gear for the activity"
3860
+ },
3861
+ "kilojoules": {
3862
+ "type": "number",
3863
+ "format": "float",
3864
+ "description": "The total work done in kilojoules during this activity. Rides only"
3865
+ },
3866
+ "average_watts": {
3867
+ "type": "number",
3868
+ "format": "float",
3869
+ "description": "Average power output in watts during this activity. Rides only"
3870
+ },
3871
+ "device_watts": {
3872
+ "type": "boolean",
3873
+ "description": "Whether the watts are from a power meter, false if estimated"
3874
+ },
3875
+ "max_watts": {
3876
+ "type": "integer",
3877
+ "description": "Rides with power meter data only"
3878
+ },
3879
+ "weighted_average_watts": {
3880
+ "type": "integer",
3881
+ "description": "Similar to Normalized Power. Rides with power meter data only"
3882
+ }
3883
+ }
3884
+ }
3885
+ ]
3886
+ },
3887
+ "PhotosSummary": {
3888
+ "type": "object",
3889
+ "properties": {
3890
+ "count": {
3891
+ "type": "integer",
3892
+ "description": "The number of photos"
3893
+ },
3894
+ "primary": {
3895
+ "type": "object",
3896
+ "properties": {
3897
+ "id": {
3898
+ "type": "integer",
3899
+ "format": "int64"
3900
+ },
3901
+ "source": {
3902
+ "type": "integer"
3903
+ },
3904
+ "unique_id": {
3905
+ "type": "string"
3906
+ },
3907
+ "urls": {
3908
+ "type": "object",
3909
+ "additionalProperties": {
3910
+ "type": "string"
3911
+ }
3912
+ }
3913
+ }
3914
+ }
3915
+ }
3916
+ },
3917
+ "Split": {
3918
+ "type": "object",
3919
+ "properties": {
3920
+ "average_speed": {
3921
+ "type": "number",
3922
+ "format": "float",
3923
+ "description": "The average speed of this split, in meters per second"
3924
+ },
3925
+ "distance": {
3926
+ "type": "number",
3927
+ "format": "float",
3928
+ "description": "The distance of this split, in meters"
3929
+ },
3930
+ "elapsed_time": {
3931
+ "type": "integer",
3932
+ "description": "The elapsed time of this split, in seconds"
3933
+ },
3934
+ "elevation_difference": {
3935
+ "type": "number",
3936
+ "format": "float",
3937
+ "description": "The elevation difference of this split, in meters"
3938
+ },
3939
+ "pace_zone": {
3940
+ "type": "integer",
3941
+ "description": "The pacing zone of this split"
3942
+ },
3943
+ "moving_time": {
3944
+ "type": "integer",
3945
+ "description": "The moving time of this split, in seconds"
3946
+ },
3947
+ "split": {
3948
+ "type": "integer",
3949
+ "description": "N/A"
3950
+ }
3951
+ }
3952
+ },
3953
+ "Lap": {
3954
+ "type": "object",
3955
+ "properties": {
3956
+ "id": {
3957
+ "type": "integer",
3958
+ "format": "int64",
3959
+ "description": "The unique identifier of this lap"
3960
+ },
3961
+ "activity": {
3962
+ "$ref": "#/definitions/MetaActivity"
3963
+ },
3964
+ "athlete": {
3965
+ "$ref": "#/definitions/MetaAthlete"
3966
+ },
3967
+ "average_cadence": {
3968
+ "type": "number",
3969
+ "format": "float",
3970
+ "description": "The lap's average cadence"
3971
+ },
3972
+ "average_speed": {
3973
+ "type": "number",
3974
+ "format": "float",
3975
+ "description": "The lap's average speed"
3976
+ },
3977
+ "distance": {
3978
+ "type": "number",
3979
+ "format": "float",
3980
+ "description": "The lap's distance, in meters"
3981
+ },
3982
+ "elapsed_time": {
3983
+ "type": "integer",
3984
+ "description": "The lap's elapsed time, in seconds"
3985
+ },
3986
+ "start_index": {
3987
+ "type": "integer",
3988
+ "description": "The start index of this effort in its activity's stream"
3989
+ },
3990
+ "end_index": {
3991
+ "type": "integer",
3992
+ "description": "The end index of this effort in its activity's stream"
3993
+ },
3994
+ "lap_index": {
3995
+ "type": "integer",
3996
+ "description": "The index of this lap in the activity it belongs to"
3997
+ },
3998
+ "max_speed": {
3999
+ "type": "number",
4000
+ "format": "float",
4001
+ "description": "The maximum speed of this lat, in meters per second"
4002
+ },
4003
+ "moving_time": {
4004
+ "type": "integer",
4005
+ "description": "The lap's moving time, in seconds"
4006
+ },
4007
+ "name": {
4008
+ "type": "string",
4009
+ "description": "The name of the lap"
4010
+ },
4011
+ "pace_zone": {
4012
+ "type": "integer",
4013
+ "description": "The athlete's pace zone during this lap"
4014
+ },
4015
+ "split": {
4016
+ "type": "integer"
4017
+ },
4018
+ "start_date": {
4019
+ "type": "string",
4020
+ "format": "date-time",
4021
+ "description": "The time at which the lap was started."
4022
+ },
4023
+ "start_date_local": {
4024
+ "type": "string",
4025
+ "format": "date-time",
4026
+ "description": "The time at which the lap was started in the local timezone."
4027
+ },
4028
+ "total_elevation_gain": {
4029
+ "type": "number",
4030
+ "format": "float",
4031
+ "description": "The elevation gain of this lap, in meters"
4032
+ }
4033
+ }
4034
+ },
4035
+ "DetailedActivity": {
4036
+ "allOf": [
4037
+ {
4038
+ "$ref": "#/definitions/SummaryActivity"
4039
+ },
4040
+ {
4041
+ "properties": {
4042
+ "description": {
4043
+ "type": "string",
4044
+ "description": "The description of the activity"
4045
+ },
4046
+ "photos": {
4047
+ "$ref": "#/definitions/PhotosSummary"
4048
+ },
4049
+ "gear": {
4050
+ "$ref": "#/definitions/SummaryGear"
4051
+ },
4052
+ "calories": {
4053
+ "type": "number",
4054
+ "format": "float",
4055
+ "description": "The number of kilocalories consumed during this activity"
4056
+ },
4057
+ "segment_efforts": {
4058
+ "type": "array",
4059
+ "items": {
4060
+ "$ref": "#/definitions/DetailedSegmentEffort"
4061
+ }
4062
+ },
4063
+ "device_name": {
4064
+ "type": "string",
4065
+ "description": "The name of the device used to record the activity"
4066
+ },
4067
+ "embed_token": {
4068
+ "type": "string",
4069
+ "description": "The token used to embed a Strava activity"
4070
+ },
4071
+ "splits_metric": {
4072
+ "type": "array",
4073
+ "items": {
4074
+ "$ref": "#/definitions/Split"
4075
+ },
4076
+ "description": "The splits of this activity in metric units (for runs)"
4077
+ },
4078
+ "splits_standard": {
4079
+ "type": "array",
4080
+ "items": {
4081
+ "$ref": "#/definitions/Split"
4082
+ },
4083
+ "description": "The splits of this activity in imperial units (for runs)"
4084
+ },
4085
+ "laps": {
4086
+ "type": "array",
4087
+ "items": {
4088
+ "$ref": "#/definitions/Lap"
4089
+ }
4090
+ },
4091
+ "best_efforts": {
4092
+ "type": "array",
4093
+ "items": {
4094
+ "$ref": "#/definitions/DetailedSegmentEffort"
4095
+ }
4096
+ }
4097
+ }
4098
+ }
4099
+ ]
4100
+ },
4101
+ "UpdatableActivity": {
4102
+ "type": "object",
4103
+ "properties": {
4104
+ "commute": {
4105
+ "type": "boolean",
4106
+ "description": "Whether this activity is a commute"
4107
+ },
4108
+ "trainer": {
4109
+ "type": "boolean",
4110
+ "description": "Whether this activity was recorded on a training machine"
4111
+ },
4112
+ "hide_from_home": {
4113
+ "type": "boolean",
4114
+ "description": "Whether this activity is muted"
4115
+ },
4116
+ "description": {
4117
+ "type": "string",
4118
+ "description": "The description of the activity"
4119
+ },
4120
+ "name": {
4121
+ "type": "string",
4122
+ "description": "The name of the activity"
4123
+ },
4124
+ "type": {
4125
+ "$ref": "#/definitions/ActivityType",
4126
+ "description": "Deprecated. Prefer to use sport_type. In a request where both type and sport_type are present, this field will be ignored"
4127
+ },
4128
+ "sport_type": {
4129
+ "$ref": "#/definitions/SportType"
4130
+ },
4131
+ "gear_id": {
4132
+ "type": "string",
4133
+ "description": "Identifier for the gear associated with the activity. ‘none’ clears gear from activity"
4134
+ }
4135
+ }
4136
+ },
4137
+ "TimedZoneRange": {
4138
+ "description": "A union type representing the time spent in a given zone.",
4139
+ "allOf": [
4140
+ {
4141
+ "$ref": "#/definitions/ZoneRange"
4142
+ },
4143
+ {
4144
+ "properties": {
4145
+ "time": {
4146
+ "type": "integer",
4147
+ "description": "The number of seconds spent in this zone"
4148
+ }
4149
+ }
4150
+ }
4151
+ ]
4152
+ },
4153
+ "TimedZoneDistribution": {
4154
+ "type": "array",
4155
+ "description": "Stores the exclusive ranges representing zones and the time spent in each.",
4156
+ "items": {
4157
+ "$ref": "#/definitions/TimedZoneRange"
4158
+ }
4159
+ },
4160
+ "ActivityZone": {
4161
+ "type": "object",
4162
+ "properties": {
4163
+ "score": {
4164
+ "type": "integer"
4165
+ },
4166
+ "distribution_buckets": {
4167
+ "$ref": "#/definitions/TimedZoneDistribution"
4168
+ },
4169
+ "type": {
4170
+ "type": "string",
4171
+ "enum": [
4172
+ "heartrate",
4173
+ "power"
4174
+ ]
4175
+ },
4176
+ "sensor_based": {
4177
+ "type": "boolean"
4178
+ },
4179
+ "points": {
4180
+ "type": "integer"
4181
+ },
4182
+ "custom_zones": {
4183
+ "type": "boolean"
4184
+ },
4185
+ "max": {
4186
+ "type": "integer"
4187
+ }
4188
+ }
4189
+ },
4190
+ "Comment": {
4191
+ "type": "object",
4192
+ "properties": {
4193
+ "id": {
4194
+ "type": "integer",
4195
+ "format": "int64",
4196
+ "description": "The unique identifier of this comment"
4197
+ },
4198
+ "activity_id": {
4199
+ "type": "integer",
4200
+ "format": "int64",
4201
+ "description": "The identifier of the activity this comment is related to"
4202
+ },
4203
+ "text": {
4204
+ "type": "string",
4205
+ "description": "The content of the comment"
4206
+ },
4207
+ "athlete": {
4208
+ "$ref": "#/definitions/SummaryAthlete"
4209
+ },
4210
+ "created_at": {
4211
+ "type": "string",
4212
+ "format": "date-time",
4213
+ "description": "The time at which this comment was created."
4214
+ }
4215
+ }
4216
+ },
4217
+ "DetailedClub": {
4218
+ "allOf": [
4219
+ {
4220
+ "$ref": "#/definitions/SummaryClub"
4221
+ },
4222
+ {
4223
+ "properties": {
4224
+ "membership": {
4225
+ "type": "string",
4226
+ "enum": [
4227
+ "member",
4228
+ "pending"
4229
+ ],
4230
+ "description": "The membership status of the logged-in athlete."
4231
+ },
4232
+ "admin": {
4233
+ "type": "boolean",
4234
+ "description": "Whether the currently logged-in athlete is an administrator of this club."
4235
+ },
4236
+ "owner": {
4237
+ "type": "boolean",
4238
+ "description": "Whether the currently logged-in athlete is the owner of this club."
4239
+ },
4240
+ "following_count": {
4241
+ "type": "integer",
4242
+ "description": "The number of athletes in the club that the logged-in athlete follows."
4243
+ }
4244
+ }
4245
+ }
4246
+ ]
4247
+ },
4248
+ "ClubAthlete": {
4249
+ "type": "object",
4250
+ "properties": {
4251
+ "resource_state": {
4252
+ "type": "integer",
4253
+ "description": "Resource state, indicates level of detail. Possible values: 1 -> \"meta\", 2 -> \"summary\", 3 -> \"detail\""
4254
+ },
4255
+ "firstname": {
4256
+ "type": "string",
4257
+ "description": "The athlete's first name."
4258
+ },
4259
+ "lastname": {
4260
+ "type": "string",
4261
+ "description": "The athlete's last initial."
4262
+ },
4263
+ "member": {
4264
+ "type": "string",
4265
+ "description": "The athlete's member status."
4266
+ },
4267
+ "admin": {
4268
+ "type": "boolean",
4269
+ "description": "Whether the athlete is a club admin."
4270
+ },
4271
+ "owner": {
4272
+ "type": "boolean",
4273
+ "description": "Whether the athlete is club owner."
4274
+ }
4275
+ }
4276
+ },
4277
+ "ClubActivity": {
4278
+ "type": "object",
4279
+ "properties": {
4280
+ "athlete": {
4281
+ "$ref": "#/definitions/MetaAthlete"
4282
+ },
4283
+ "name": {
4284
+ "type": "string",
4285
+ "description": "The name of the activity"
4286
+ },
4287
+ "distance": {
4288
+ "type": "number",
4289
+ "format": "float",
4290
+ "description": "The activity's distance, in meters"
4291
+ },
4292
+ "moving_time": {
4293
+ "type": "integer",
4294
+ "description": "The activity's moving time, in seconds"
4295
+ },
4296
+ "elapsed_time": {
4297
+ "type": "integer",
4298
+ "description": "The activity's elapsed time, in seconds"
4299
+ },
4300
+ "total_elevation_gain": {
4301
+ "type": "number",
4302
+ "format": "float",
4303
+ "description": "The activity's total elevation gain."
4304
+ },
4305
+ "type": {
4306
+ "$ref": "#/definitions/ActivityType",
4307
+ "description": "Deprecated. Prefer to use sport_type"
4308
+ },
4309
+ "sport_type": {
4310
+ "$ref": "#/definitions/SportType"
4311
+ },
4312
+ "workout_type": {
4313
+ "type": "integer",
4314
+ "description": "The activity's workout type"
4315
+ }
4316
+ }
4317
+ },
4318
+ "DetailedGear": {
4319
+ "allOf": [
4320
+ {
4321
+ "$ref": "#/definitions/SummaryGear"
4322
+ },
4323
+ {
4324
+ "properties": {
4325
+ "brand_name": {
4326
+ "type": "string",
4327
+ "description": "The gear's brand name."
4328
+ },
4329
+ "model_name": {
4330
+ "type": "string",
4331
+ "description": "The gear's model name."
4332
+ },
4333
+ "frame_type": {
4334
+ "type": "integer",
4335
+ "description": "The gear's frame type (bike only)."
4336
+ },
4337
+ "description": {
4338
+ "type": "string",
4339
+ "description": "The gear's description."
4340
+ }
4341
+ }
4342
+ }
4343
+ ]
4344
+ },
4345
+ "Waypoint": {
4346
+ "type": "object",
4347
+ "properties": {
4348
+ "latlng": {
4349
+ "$ref": "#/definitions/LatLng",
4350
+ "description": "The location along the route that the waypoint is closest to"
4351
+ },
4352
+ "target_latlng": {
4353
+ "$ref": "#/definitions/LatLng",
4354
+ "description": "A location off of the route that the waypoint is (optional)"
4355
+ },
4356
+ "categories": {
4357
+ "type": "array",
4358
+ "items": {
4359
+ "type": "string"
4360
+ },
4361
+ "minItems": 0,
4362
+ "description": "Categories that the waypoint belongs to"
4363
+ },
4364
+ "title": {
4365
+ "type": "string",
4366
+ "description": "A title for the waypoint"
4367
+ },
4368
+ "description": {
4369
+ "type": "string",
4370
+ "description": "A description of the waypoint (optional)"
4371
+ },
4372
+ "distance_into_route": {
4373
+ "type": "number",
4374
+ "format": "float",
4375
+ "description": "The number meters along the route that the waypoint is located"
4376
+ }
4377
+ }
4378
+ },
4379
+ "Route": {
4380
+ "type": "object",
4381
+ "properties": {
4382
+ "athlete": {
4383
+ "$ref": "#/definitions/SummaryAthlete"
4384
+ },
4385
+ "description": {
4386
+ "type": "string",
4387
+ "description": "The description of the route"
4388
+ },
4389
+ "distance": {
4390
+ "type": "number",
4391
+ "format": "float",
4392
+ "description": "The route's distance, in meters"
4393
+ },
4394
+ "elevation_gain": {
4395
+ "type": "number",
4396
+ "format": "float",
4397
+ "description": "The route's elevation gain."
4398
+ },
4399
+ "id": {
4400
+ "type": "integer",
4401
+ "format": "int64",
4402
+ "description": "The unique identifier of this route"
4403
+ },
4404
+ "id_str": {
4405
+ "type": "string",
4406
+ "description": "The unique identifier of the route in string format"
4407
+ },
4408
+ "map": {
4409
+ "$ref": "#/definitions/PolylineMap"
4410
+ },
4411
+ "name": {
4412
+ "type": "string",
4413
+ "description": "The name of this route"
4414
+ },
4415
+ "private": {
4416
+ "type": "boolean",
4417
+ "description": "Whether this route is private"
4418
+ },
4419
+ "starred": {
4420
+ "type": "boolean",
4421
+ "description": "Whether this route is starred by the logged-in athlete"
4422
+ },
4423
+ "timestamp": {
4424
+ "type": "integer",
4425
+ "description": "An epoch timestamp of when the route was created"
4426
+ },
4427
+ "type": {
4428
+ "type": "integer",
4429
+ "description": "This route's type (1 for ride, 2 for runs)"
4430
+ },
4431
+ "sub_type": {
4432
+ "type": "integer",
4433
+ "description": "This route's sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed)"
4434
+ },
4435
+ "created_at": {
4436
+ "type": "string",
4437
+ "format": "date-time",
4438
+ "description": "The time at which the route was created"
4439
+ },
4440
+ "updated_at": {
4441
+ "type": "string",
4442
+ "format": "date-time",
4443
+ "description": "The time at which the route was last updated"
4444
+ },
4445
+ "estimated_moving_time": {
4446
+ "type": "integer",
4447
+ "description": "Estimated time in seconds for the authenticated athlete to complete route"
4448
+ },
4449
+ "segments": {
4450
+ "type": "array",
4451
+ "items": {
4452
+ "$ref": "#/definitions/SummarySegment"
4453
+ },
4454
+ "description": "The segments traversed by this route"
4455
+ },
4456
+ "waypoints": {
4457
+ "type": "array",
4458
+ "items": {
4459
+ "$ref": "#/definitions/Waypoint"
4460
+ },
4461
+ "minItems": 0,
4462
+ "description": "The custom waypoints along this route"
4463
+ }
4464
+ }
4465
+ },
4466
+ "Upload": {
4467
+ "type": "object",
4468
+ "properties": {
4469
+ "id": {
4470
+ "type": "integer",
4471
+ "format": "int64",
4472
+ "description": "The unique identifier of the upload"
4473
+ },
4474
+ "id_str": {
4475
+ "type": "string",
4476
+ "description": "The unique identifier of the upload in string format"
4477
+ },
4478
+ "external_id": {
4479
+ "type": "string",
4480
+ "description": "The external identifier of the upload"
4481
+ },
4482
+ "error": {
4483
+ "type": "string",
4484
+ "description": "The error associated with this upload"
4485
+ },
4486
+ "status": {
4487
+ "type": "string",
4488
+ "description": "The status of this upload"
4489
+ },
4490
+ "activity_id": {
4491
+ "type": "integer",
4492
+ "format": "int64",
4493
+ "description": "The identifier of the activity this upload resulted into"
4494
+ }
4495
+ }
4496
+ },
4497
+ "BaseStream": {
4498
+ "type": "object",
4499
+ "properties": {
4500
+ "original_size": {
4501
+ "type": "integer",
4502
+ "description": "The number of data points in this stream"
4503
+ },
4504
+ "resolution": {
4505
+ "type": "string",
4506
+ "enum": [
4507
+ "low",
4508
+ "medium",
4509
+ "high"
4510
+ ],
4511
+ "description": "The level of detail (sampling) in which this stream was returned"
4512
+ },
4513
+ "series_type": {
4514
+ "type": "string",
4515
+ "enum": [
4516
+ "distance",
4517
+ "time"
4518
+ ],
4519
+ "description": "The base series used in the case the stream was downsampled"
4520
+ }
4521
+ }
4522
+ },
4523
+ "TimeStream": {
4524
+ "allOf": [
4525
+ {
4526
+ "$ref": "#/definitions/BaseStream"
4527
+ },
4528
+ {
4529
+ "properties": {
4530
+ "data": {
4531
+ "type": "array",
4532
+ "items": {
4533
+ "type": "integer"
4534
+ },
4535
+ "description": "The sequence of time values for this stream, in seconds"
4536
+ }
4537
+ }
4538
+ }
4539
+ ]
4540
+ },
4541
+ "DistanceStream": {
4542
+ "allOf": [
4543
+ {
4544
+ "$ref": "#/definitions/BaseStream"
4545
+ },
4546
+ {
4547
+ "properties": {
4548
+ "data": {
4549
+ "type": "array",
4550
+ "items": {
4551
+ "type": "number",
4552
+ "format": "float"
4553
+ },
4554
+ "description": "The sequence of distance values for this stream, in meters"
4555
+ }
4556
+ }
4557
+ }
4558
+ ]
4559
+ },
4560
+ "LatLngStream": {
4561
+ "allOf": [
4562
+ {
4563
+ "$ref": "#/definitions/BaseStream"
4564
+ },
4565
+ {
4566
+ "properties": {
4567
+ "data": {
4568
+ "type": "array",
4569
+ "items": {
4570
+ "$ref": "#/definitions/LatLng"
4571
+ },
4572
+ "description": "The sequence of lat/long values for this stream"
4573
+ }
4574
+ }
4575
+ }
4576
+ ]
4577
+ },
4578
+ "AltitudeStream": {
4579
+ "allOf": [
4580
+ {
4581
+ "$ref": "#/definitions/BaseStream"
4582
+ },
4583
+ {
4584
+ "properties": {
4585
+ "data": {
4586
+ "type": "array",
4587
+ "items": {
4588
+ "type": "number",
4589
+ "format": "float"
4590
+ },
4591
+ "description": "The sequence of altitude values for this stream, in meters"
4592
+ }
4593
+ }
4594
+ }
4595
+ ]
4596
+ },
4597
+ "SmoothVelocityStream": {
4598
+ "allOf": [
4599
+ {
4600
+ "$ref": "#/definitions/BaseStream"
4601
+ },
4602
+ {
4603
+ "properties": {
4604
+ "data": {
4605
+ "type": "array",
4606
+ "items": {
4607
+ "type": "number",
4608
+ "format": "float"
4609
+ },
4610
+ "description": "The sequence of velocity values for this stream, in meters per second"
4611
+ }
4612
+ }
4613
+ }
4614
+ ]
4615
+ },
4616
+ "HeartrateStream": {
4617
+ "allOf": [
4618
+ {
4619
+ "$ref": "#/definitions/BaseStream"
4620
+ },
4621
+ {
4622
+ "properties": {
4623
+ "data": {
4624
+ "type": "array",
4625
+ "items": {
4626
+ "type": "integer"
4627
+ },
4628
+ "description": "The sequence of heart rate values for this stream, in beats per minute"
4629
+ }
4630
+ }
4631
+ }
4632
+ ]
4633
+ },
4634
+ "CadenceStream": {
4635
+ "allOf": [
4636
+ {
4637
+ "$ref": "#/definitions/BaseStream"
4638
+ },
4639
+ {
4640
+ "properties": {
4641
+ "data": {
4642
+ "type": "array",
4643
+ "items": {
4644
+ "type": "integer"
4645
+ },
4646
+ "description": "The sequence of cadence values for this stream, in rotations per minute"
4647
+ }
4648
+ }
4649
+ }
4650
+ ]
4651
+ },
4652
+ "PowerStream": {
4653
+ "allOf": [
4654
+ {
4655
+ "$ref": "#/definitions/BaseStream"
4656
+ },
4657
+ {
4658
+ "properties": {
4659
+ "data": {
4660
+ "type": "array",
4661
+ "items": {
4662
+ "type": "integer"
4663
+ },
4664
+ "description": "The sequence of power values for this stream, in watts"
4665
+ }
4666
+ }
4667
+ }
4668
+ ]
4669
+ },
4670
+ "TemperatureStream": {
4671
+ "allOf": [
4672
+ {
4673
+ "$ref": "#/definitions/BaseStream"
4674
+ },
4675
+ {
4676
+ "properties": {
4677
+ "data": {
4678
+ "type": "array",
4679
+ "items": {
4680
+ "type": "integer"
4681
+ },
4682
+ "description": "The sequence of temperature values for this stream, in celsius degrees"
4683
+ }
4684
+ }
4685
+ }
4686
+ ]
4687
+ },
4688
+ "MovingStream": {
4689
+ "allOf": [
4690
+ {
4691
+ "$ref": "#/definitions/BaseStream"
4692
+ },
4693
+ {
4694
+ "properties": {
4695
+ "data": {
4696
+ "type": "array",
4697
+ "items": {
4698
+ "type": "boolean"
4699
+ },
4700
+ "description": "The sequence of moving values for this stream, as boolean values"
4701
+ }
4702
+ }
4703
+ }
4704
+ ]
4705
+ },
4706
+ "SmoothGradeStream": {
4707
+ "allOf": [
4708
+ {
4709
+ "$ref": "#/definitions/BaseStream"
4710
+ },
4711
+ {
4712
+ "properties": {
4713
+ "data": {
4714
+ "type": "array",
4715
+ "items": {
4716
+ "type": "number",
4717
+ "format": "float"
4718
+ },
4719
+ "description": "The sequence of grade values for this stream, as percents of a grade"
4720
+ }
4721
+ }
4722
+ }
4723
+ ]
4724
+ },
4725
+ "StreamSet": {
4726
+ "type": "object",
4727
+ "properties": {
4728
+ "time": {
4729
+ "$ref": "#/definitions/TimeStream"
4730
+ },
4731
+ "distance": {
4732
+ "$ref": "#/definitions/DistanceStream"
4733
+ },
4734
+ "latlng": {
4735
+ "$ref": "#/definitions/LatLngStream"
4736
+ },
4737
+ "altitude": {
4738
+ "$ref": "#/definitions/AltitudeStream"
4739
+ },
4740
+ "velocity_smooth": {
4741
+ "$ref": "#/definitions/SmoothVelocityStream"
4742
+ },
4743
+ "heartrate": {
4744
+ "$ref": "#/definitions/HeartrateStream"
4745
+ },
4746
+ "cadence": {
4747
+ "$ref": "#/definitions/CadenceStream"
4748
+ },
4749
+ "watts": {
4750
+ "$ref": "#/definitions/PowerStream"
4751
+ },
4752
+ "temp": {
4753
+ "$ref": "#/definitions/TemperatureStream"
4754
+ },
4755
+ "moving": {
4756
+ "$ref": "#/definitions/MovingStream"
4757
+ },
4758
+ "grade_smooth": {
4759
+ "$ref": "#/definitions/SmoothGradeStream"
4760
+ }
4761
+ }
4762
+ }
4763
+ },
4764
+ "parameters": {
4765
+ "page": {
4766
+ "name": "page",
4767
+ "in": "query",
4768
+ "description": "Page number. Defaults to 1.",
4769
+ "type": "integer"
4770
+ },
4771
+ "perPage": {
4772
+ "name": "per_page",
4773
+ "in": "query",
4774
+ "description": "Number of items per page. Defaults to 30.",
4775
+ "type": "integer",
4776
+ "default": 30
4777
+ }
4778
+ },
4779
+ "securityDefinitions": {
4780
+ "strava_oauth": {
4781
+ "type": "oauth2",
4782
+ "flow": "accessCode",
4783
+ "authorizationUrl": "https://www.strava.com/api/v3/oauth/authorize",
4784
+ "tokenUrl": "https://www.strava.com/api/v3/oauth/token",
4785
+ "scopes": {
4786
+ "read": "Read public segments, public routes, public profile data, public posts, public events, club feeds, and leaderboards",
4787
+ "read_all": "Read private routes, private segments, and private events for the user",
4788
+ "profile:read_all": "Read all profile information even if the user has set their profile visibility to Followers or Only You",
4789
+ "profile:write": "Update the user's weight and Functional Threshold Power (FTP), and access to star or unstar segments on their behalf",
4790
+ "activity:read": "Read the user's activity data for activities that are visible to Everyone and Followers, excluding privacy zone data",
4791
+ "activity:read_all": "The same access as activity:read, plus privacy zone data and access to read the user's activities with visibility set to Only You",
4792
+ "activity:write": "Access to create manual activities and uploads, and access to edit any activities that are visible to the app, based on activity read access level"
4793
+ }
4794
+ }
4795
+ }
4796
+ }