-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_test.spec.ts
283 lines (260 loc) · 9.56 KB
/
api_test.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
/**
* Strava API v3
* 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.
*
* OpenAPI spec version: 3.0.0
*
*
* NOTE: This file is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the file manually.
*/
import * as api from "./api"
import { Configuration } from "./configuration"
const config: Configuration = {}
describe("ActivitiesApi", () => {
let instance: api.ActivitiesApi
beforeEach(function() {
instance = new api.ActivitiesApi(config)
});
test("createActivity", () => {
const name: string = "name_example"
const type: string = "type_example"
const startDateLocal: Date = 2013-10-20T19:20:30+01:00
const elapsedTime: number = 56
const description: string = "description_example"
const distance: number = 3.4
const trainer: number = 56
const commute: number = 56
return expect(instance.createActivity(name, type, startDateLocal, elapsedTime, description, distance, trainer, commute, {})).resolves.toBe(null)
})
test("getActivityById", () => {
const id: number = 789
const includeAllEfforts: boolean = true
return expect(instance.getActivityById(id, includeAllEfforts, {})).resolves.toBe(null)
})
test("getCommentsByActivityId", () => {
const id: number = 789
const page: number = 56
const perPage: number = 56
return expect(instance.getCommentsByActivityId(id, page, perPage, {})).resolves.toBe(null)
})
test("getKudoersByActivityId", () => {
const id: number = 789
const page: number = 56
const perPage: number = 56
return expect(instance.getKudoersByActivityId(id, page, perPage, {})).resolves.toBe(null)
})
test("getLapsByActivityId", () => {
const id: number = 789
return expect(instance.getLapsByActivityId(id, {})).resolves.toBe(null)
})
test("getLoggedInAthleteActivities", () => {
const before: number = 56
const after: number = 56
const page: number = 56
const perPage: number = 56
return expect(instance.getLoggedInAthleteActivities(before, after, page, perPage, {})).resolves.toBe(null)
})
test("getZonesByActivityId", () => {
const id: number = 789
return expect(instance.getZonesByActivityId(id, {})).resolves.toBe(null)
})
test("updateActivityById", () => {
const id: number = 789
const body: api.UpdatableActivity = undefined
return expect(instance.updateActivityById(id, body, {})).resolves.toBe(null)
})
})
describe("AthletesApi", () => {
let instance: api.AthletesApi
beforeEach(function() {
instance = new api.AthletesApi(config)
});
test("getLoggedInAthlete", () => {
return expect(instance.getLoggedInAthlete({})).resolves.toBe(null)
})
test("getLoggedInAthleteZones", () => {
return expect(instance.getLoggedInAthleteZones({})).resolves.toBe(null)
})
test("getStats", () => {
const id: number = 789
return expect(instance.getStats(id, {})).resolves.toBe(null)
})
test("updateLoggedInAthlete", () => {
const weight: number = 3.4
return expect(instance.updateLoggedInAthlete(weight, {})).resolves.toBe(null)
})
})
describe("ClubsApi", () => {
let instance: api.ClubsApi
beforeEach(function() {
instance = new api.ClubsApi(config)
});
test("getClubActivitiesById", () => {
const id: number = 789
const page: number = 56
const perPage: number = 56
return expect(instance.getClubActivitiesById(id, page, perPage, {})).resolves.toBe(null)
})
test("getClubAdminsById", () => {
const id: number = 789
const page: number = 56
const perPage: number = 56
return expect(instance.getClubAdminsById(id, page, perPage, {})).resolves.toBe(null)
})
test("getClubById", () => {
const id: number = 789
return expect(instance.getClubById(id, {})).resolves.toBe(null)
})
test("getClubMembersById", () => {
const id: number = 789
const page: number = 56
const perPage: number = 56
return expect(instance.getClubMembersById(id, page, perPage, {})).resolves.toBe(null)
})
test("getLoggedInAthleteClubs", () => {
const page: number = 56
const perPage: number = 56
return expect(instance.getLoggedInAthleteClubs(page, perPage, {})).resolves.toBe(null)
})
})
describe("GearsApi", () => {
let instance: api.GearsApi
beforeEach(function() {
instance = new api.GearsApi(config)
});
test("getGearById", () => {
const id: string = "id_example"
return expect(instance.getGearById(id, {})).resolves.toBe(null)
})
})
describe("RoutesApi", () => {
let instance: api.RoutesApi
beforeEach(function() {
instance = new api.RoutesApi(config)
});
test("getRouteAsGPX", () => {
const id: number = 789
return expect(instance.getRouteAsGPX(id, {})).resolves.toBe(null)
})
test("getRouteAsTCX", () => {
const id: number = 789
return expect(instance.getRouteAsTCX(id, {})).resolves.toBe(null)
})
test("getRouteById", () => {
const id: number = 789
return expect(instance.getRouteById(id, {})).resolves.toBe(null)
})
test("getRoutesByAthleteId", () => {
const page: number = 56
const perPage: number = 56
return expect(instance.getRoutesByAthleteId(page, perPage, {})).resolves.toBe(null)
})
})
describe("RunningRacesApi", () => {
let instance: api.RunningRacesApi
beforeEach(function() {
instance = new api.RunningRacesApi(config)
});
test("getRunningRaceById", () => {
const id: number = 789
return expect(instance.getRunningRaceById(id, {})).resolves.toBe(null)
})
test("getRunningRaces", () => {
const year: number = 56
return expect(instance.getRunningRaces(year, {})).resolves.toBe(null)
})
})
describe("SegmentEffortsApi", () => {
let instance: api.SegmentEffortsApi
beforeEach(function() {
instance = new api.SegmentEffortsApi(config)
});
test("getEffortsBySegmentId", () => {
const segmentId: number = 56
const startDateLocal: Date = 2013-10-20T19:20:30+01:00
const endDateLocal: Date = 2013-10-20T19:20:30+01:00
const perPage: number = 56
return expect(instance.getEffortsBySegmentId(segmentId, startDateLocal, endDateLocal, perPage, {})).resolves.toBe(null)
})
test("getSegmentEffortById", () => {
const id: number = 789
return expect(instance.getSegmentEffortById(id, {})).resolves.toBe(null)
})
})
describe("SegmentsApi", () => {
let instance: api.SegmentsApi
beforeEach(function() {
instance = new api.SegmentsApi(config)
});
test("exploreSegments", () => {
const bounds: Array<number> = undefined
const activityType: string = "activityType_example"
const minCat: number = 56
const maxCat: number = 56
return expect(instance.exploreSegments(bounds, activityType, minCat, maxCat, {})).resolves.toBe(null)
})
test("getLoggedInAthleteStarredSegments", () => {
const page: number = 56
const perPage: number = 56
return expect(instance.getLoggedInAthleteStarredSegments(page, perPage, {})).resolves.toBe(null)
})
test("getSegmentById", () => {
const id: number = 789
return expect(instance.getSegmentById(id, {})).resolves.toBe(null)
})
test("starSegment", () => {
const starred: boolean = true
const id: number = 789
return expect(instance.starSegment(starred, id, {})).resolves.toBe(null)
})
})
describe("StreamsApi", () => {
let instance: api.StreamsApi
beforeEach(function() {
instance = new api.StreamsApi(config)
});
test("getActivityStreams", () => {
const id: number = 789
const keys: Array<string> = undefined
const keyByType: boolean = true
return expect(instance.getActivityStreams(id, keys, keyByType, {})).resolves.toBe(null)
})
test("getRouteStreams", () => {
const id: number = 789
return expect(instance.getRouteStreams(id, {})).resolves.toBe(null)
})
test("getSegmentEffortStreams", () => {
const id: number = 789
const keys: Array<string> = undefined
const keyByType: boolean = true
return expect(instance.getSegmentEffortStreams(id, keys, keyByType, {})).resolves.toBe(null)
})
test("getSegmentStreams", () => {
const id: number = 789
const keys: Array<string> = undefined
const keyByType: boolean = true
return expect(instance.getSegmentStreams(id, keys, keyByType, {})).resolves.toBe(null)
})
})
describe("UploadsApi", () => {
let instance: api.UploadsApi
beforeEach(function() {
instance = new api.UploadsApi(config)
});
test("createUpload", () => {
const file: Blob = "file_example"
const name: string = "name_example"
const description: string = "description_example"
const trainer: string = "trainer_example"
const commute: string = "commute_example"
const dataType: string = "dataType_example"
const externalId: string = "externalId_example"
return expect(instance.createUpload(file, name, description, trainer, commute, dataType, externalId, {})).resolves.toBe(null)
})
test("getUploadById", () => {
const uploadId: number = 789
return expect(instance.getUploadById(uploadId, {})).resolves.toBe(null)
})
})