@natsuneko-laboratory/catalyst-sdk 0.7.2 → 1.0.0-alpha.2
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.
- package/dist/index.d.mts +712 -456
- package/dist/index.d.ts +712 -456
- package/dist/index.js +806 -554
- package/dist/index.mjs +802 -554
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -117,58 +117,160 @@ function buildTimelineParams(opts) {
|
|
|
117
117
|
return Object.keys(params).length > 0 ? params : void 0;
|
|
118
118
|
}
|
|
119
119
|
var CatalystEndpoint = {
|
|
120
|
+
// Album
|
|
120
121
|
createAlbum(data) {
|
|
121
122
|
return { path: "/catalyst/v1/album", method: "POST", body: data };
|
|
122
123
|
},
|
|
123
124
|
getAlbum(id, opts = {}) {
|
|
125
|
+
const params = {};
|
|
126
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
127
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
128
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
124
129
|
return {
|
|
125
130
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
126
131
|
method: "GET",
|
|
127
|
-
queryParameters:
|
|
132
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
128
133
|
};
|
|
129
134
|
},
|
|
130
|
-
|
|
135
|
+
insertToAlbum(id, statusId) {
|
|
131
136
|
return {
|
|
132
137
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
133
|
-
method: "
|
|
134
|
-
body:
|
|
138
|
+
method: "PUT",
|
|
139
|
+
body: { insert: statusId }
|
|
135
140
|
};
|
|
136
141
|
},
|
|
137
|
-
|
|
142
|
+
removeFromAlbum(id, statusId) {
|
|
138
143
|
return {
|
|
139
144
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
140
145
|
method: "PUT",
|
|
141
|
-
body:
|
|
146
|
+
body: { remove: statusId }
|
|
142
147
|
};
|
|
143
148
|
},
|
|
144
|
-
|
|
149
|
+
editAlbum(id, data) {
|
|
145
150
|
return {
|
|
146
151
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
147
|
-
method: "
|
|
152
|
+
method: "PATCH",
|
|
148
153
|
body: data
|
|
149
154
|
};
|
|
150
155
|
},
|
|
151
156
|
deleteAlbum(id) {
|
|
152
157
|
return { path: `/catalyst/v1/album/by/id/${id}`, method: "DELETE" };
|
|
153
158
|
},
|
|
154
|
-
|
|
159
|
+
getAlbumBooks(id) {
|
|
160
|
+
return { path: `/catalyst/v1/album/by/id/${id}/book`, method: "GET" };
|
|
161
|
+
},
|
|
162
|
+
createAlbumBook(id, data) {
|
|
155
163
|
return {
|
|
156
|
-
path: `/catalyst/v1/album/by/
|
|
164
|
+
path: `/catalyst/v1/album/by/id/${id}/book`,
|
|
165
|
+
method: "POST",
|
|
166
|
+
body: data
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
getAlbumBook(id, bookId) {
|
|
170
|
+
return {
|
|
171
|
+
path: `/catalyst/v1/album/by/id/${id}/book/${bookId}`,
|
|
172
|
+
method: "GET"
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
regenerateAlbumBook(id, bookId) {
|
|
176
|
+
return {
|
|
177
|
+
path: `/catalyst/v1/album/by/id/${id}/book/${bookId}/regenerate`,
|
|
178
|
+
method: "POST"
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
182
|
+
return {
|
|
183
|
+
path: "/catalyst/v1/album/by/me",
|
|
157
184
|
method: "GET",
|
|
158
185
|
queryParameters: { include_smart_albums: String(includeSmartAlbums) }
|
|
159
186
|
};
|
|
160
187
|
},
|
|
161
|
-
|
|
188
|
+
listAlbums(username, includeSmartAlbum = true) {
|
|
189
|
+
return {
|
|
190
|
+
path: `/catalyst/v1/album/by/user/${username}`,
|
|
191
|
+
method: "GET",
|
|
192
|
+
queryParameters: { include_smart_album: String(includeSmartAlbum) }
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
searchAlbums(q, includeSmartAlbum = true, until) {
|
|
196
|
+
const params = {
|
|
197
|
+
include_smart_album: String(includeSmartAlbum)
|
|
198
|
+
};
|
|
199
|
+
if (q != null) params["q"] = q;
|
|
200
|
+
if (until != null) params["until"] = until;
|
|
201
|
+
return { path: "/catalyst/v1/album/search", method: "GET", queryParameters: params };
|
|
202
|
+
},
|
|
203
|
+
// Announcements
|
|
204
|
+
announcements() {
|
|
205
|
+
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
206
|
+
},
|
|
207
|
+
// Blocks
|
|
208
|
+
block(userId) {
|
|
209
|
+
return {
|
|
210
|
+
path: "/catalyst/v1/blocks",
|
|
211
|
+
method: "POST",
|
|
212
|
+
body: { userId }
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
unblock(userId) {
|
|
216
|
+
return {
|
|
217
|
+
path: "/catalyst/v1/blocks",
|
|
218
|
+
method: "DELETE",
|
|
219
|
+
body: { userId }
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
// Contest
|
|
223
|
+
// NOTE: the spec only exposes read + vote operations for contests; contest management
|
|
224
|
+
// (create/edit/awards/collaborators/copy/dashboard/publish/polls) is no longer part of the API.
|
|
225
|
+
getContestsByMe() {
|
|
226
|
+
return { path: "/catalyst/v1/contest/by/me", method: "GET" };
|
|
227
|
+
},
|
|
228
|
+
getContestBySlug(slug) {
|
|
229
|
+
return { path: `/catalyst/v1/contest/by/slug/${slug}`, method: "GET" };
|
|
230
|
+
},
|
|
231
|
+
contestTimeline(slug) {
|
|
232
|
+
return {
|
|
233
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/timeline`,
|
|
234
|
+
method: "GET"
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
getContestVotes(slug) {
|
|
238
|
+
return { path: `/catalyst/v1/contest/by/slug/${slug}/vote`, method: "GET" };
|
|
239
|
+
},
|
|
240
|
+
addContestVote(slug, status) {
|
|
241
|
+
return {
|
|
242
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${status}`,
|
|
243
|
+
method: "POST"
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
removeContestVote(slug, status) {
|
|
247
|
+
return {
|
|
248
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${status}`,
|
|
249
|
+
method: "DELETE"
|
|
250
|
+
};
|
|
251
|
+
},
|
|
252
|
+
getContestsByUser(userId) {
|
|
253
|
+
return { path: `/catalyst/v1/contest/by/user/${userId}`, method: "GET" };
|
|
254
|
+
},
|
|
255
|
+
currentContests() {
|
|
256
|
+
return { path: "/catalyst/v1/contest/current", method: "GET" };
|
|
257
|
+
},
|
|
258
|
+
searchContests(q, state, id) {
|
|
259
|
+
const params = {};
|
|
260
|
+
if (q != null) params["q"] = q;
|
|
261
|
+
if (state != null) params["state"] = state;
|
|
262
|
+
if (id != null) params["id"] = id;
|
|
162
263
|
return {
|
|
163
|
-
path: "/catalyst/v1/
|
|
264
|
+
path: "/catalyst/v1/contest/search",
|
|
164
265
|
method: "GET",
|
|
165
|
-
queryParameters:
|
|
266
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
166
267
|
};
|
|
167
268
|
},
|
|
269
|
+
// Custom reactions
|
|
168
270
|
customReactions() {
|
|
169
271
|
return { path: "/catalyst/v1/reactions", method: "GET" };
|
|
170
272
|
},
|
|
171
|
-
|
|
273
|
+
getCustomUserReactions() {
|
|
172
274
|
return { path: "/catalyst/v1/custom-reactions", method: "GET" };
|
|
173
275
|
},
|
|
174
276
|
createCustomReaction(data) {
|
|
@@ -188,80 +290,90 @@ var CatalystEndpoint = {
|
|
|
188
290
|
deleteCustomReaction(id) {
|
|
189
291
|
return { path: `/catalyst/v1/custom-reactions/${id}`, method: "DELETE" };
|
|
190
292
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
method: "POST",
|
|
195
|
-
body: data
|
|
196
|
-
};
|
|
293
|
+
// Fleet
|
|
294
|
+
createFleet(data) {
|
|
295
|
+
return { path: "/catalyst/v1/fleet", method: "POST", body: data };
|
|
197
296
|
},
|
|
198
|
-
|
|
199
|
-
return {
|
|
200
|
-
path: "/catalyst/v1/blocks",
|
|
201
|
-
method: "DELETE",
|
|
202
|
-
body: data
|
|
203
|
-
};
|
|
297
|
+
fleetByUsername(username) {
|
|
298
|
+
return { path: `/catalyst/v1/fleet/by/user/${username}`, method: "GET" };
|
|
204
299
|
},
|
|
205
|
-
|
|
206
|
-
return { path:
|
|
300
|
+
fleets() {
|
|
301
|
+
return { path: "/catalyst/v1/fleet/ring", method: "GET" };
|
|
207
302
|
},
|
|
208
|
-
|
|
209
|
-
return { path:
|
|
303
|
+
fleetById(id) {
|
|
304
|
+
return { path: `/catalyst/v1/fleet/${id}`, method: "GET" };
|
|
210
305
|
},
|
|
211
|
-
|
|
212
|
-
return { path:
|
|
306
|
+
deleteFleet(id) {
|
|
307
|
+
return { path: `/catalyst/v1/fleet/${id}`, method: "DELETE" };
|
|
213
308
|
},
|
|
214
|
-
|
|
309
|
+
reactFleet(id, symbol) {
|
|
215
310
|
return {
|
|
216
|
-
path: `/catalyst/v1/
|
|
217
|
-
method: "
|
|
218
|
-
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
311
|
+
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
312
|
+
method: "POST"
|
|
219
313
|
};
|
|
220
314
|
},
|
|
221
|
-
|
|
315
|
+
unreactFleet(id, symbol) {
|
|
222
316
|
return {
|
|
223
|
-
path: `/catalyst/v1/
|
|
224
|
-
method: "
|
|
225
|
-
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
317
|
+
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
318
|
+
method: "DELETE"
|
|
226
319
|
};
|
|
227
320
|
},
|
|
228
|
-
|
|
229
|
-
return {
|
|
230
|
-
path: `/catalyst/v1/relationships/by/username/${username}/counts`,
|
|
231
|
-
method: "GET"
|
|
232
|
-
};
|
|
321
|
+
viewFleet(id) {
|
|
322
|
+
return { path: `/catalyst/v1/fleet/${id}/view`, method: "POST" };
|
|
233
323
|
},
|
|
234
|
-
|
|
235
|
-
return { path:
|
|
324
|
+
fleetViewers(id) {
|
|
325
|
+
return { path: `/catalyst/v1/fleet/${id}/viewers`, method: "GET" };
|
|
236
326
|
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
method: "GET",
|
|
241
|
-
queryParameters: buildTimelineParams(opts)
|
|
242
|
-
};
|
|
327
|
+
// Privacy
|
|
328
|
+
getPrivacySettings() {
|
|
329
|
+
return { path: "/catalyst/v1/privacy/settings", method: "GET" };
|
|
243
330
|
},
|
|
244
|
-
|
|
331
|
+
updatePrivacySettings(data) {
|
|
245
332
|
return {
|
|
246
|
-
path:
|
|
333
|
+
path: "/catalyst/v1/privacy/settings",
|
|
247
334
|
method: "PATCH",
|
|
248
335
|
body: data
|
|
249
336
|
};
|
|
250
337
|
},
|
|
251
|
-
|
|
252
|
-
|
|
338
|
+
// Profile tags
|
|
339
|
+
updateProfileTags(data) {
|
|
340
|
+
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
253
341
|
},
|
|
254
|
-
|
|
342
|
+
profileTagSuggestions(q) {
|
|
255
343
|
return {
|
|
256
|
-
path: "/catalyst/v1/
|
|
344
|
+
path: "/catalyst/v1/profile-tags/suggestions",
|
|
257
345
|
method: "GET",
|
|
258
346
|
queryParameters: { q }
|
|
259
347
|
};
|
|
260
348
|
},
|
|
349
|
+
getUsersByProfileTag(name, cursor) {
|
|
350
|
+
return {
|
|
351
|
+
path: `/catalyst/v1/profile-tags/by/name/${name}/users`,
|
|
352
|
+
method: "GET",
|
|
353
|
+
queryParameters: cursor != null ? { cursor } : void 0
|
|
354
|
+
};
|
|
355
|
+
},
|
|
356
|
+
getProfileTagsByUser(id) {
|
|
357
|
+
return { path: `/catalyst/v1/profile-tags/by/user/${id}`, method: "GET" };
|
|
358
|
+
},
|
|
359
|
+
// Random
|
|
360
|
+
randomStatus() {
|
|
361
|
+
return { path: "/catalyst/v1/random", method: "GET" };
|
|
362
|
+
},
|
|
363
|
+
randomStatusV1_1() {
|
|
364
|
+
return { path: "/catalyst/v1.1/random", method: "GET" };
|
|
365
|
+
},
|
|
366
|
+
onThisDay() {
|
|
367
|
+
return { path: "/catalyst/v1.1/on-this-day", method: "GET" };
|
|
368
|
+
},
|
|
369
|
+
// Status
|
|
261
370
|
createStatus(data) {
|
|
262
371
|
return { path: "/catalyst/v1/status", method: "POST", body: data };
|
|
263
372
|
},
|
|
264
373
|
getStatus(id) {
|
|
374
|
+
return { path: `/catalyst/v1/status/${id}`, method: "GET" };
|
|
375
|
+
},
|
|
376
|
+
getStatusV1_1(id) {
|
|
265
377
|
return { path: `/catalyst/v1.1/status/${id}`, method: "GET" };
|
|
266
378
|
},
|
|
267
379
|
editStatus(id, data) {
|
|
@@ -270,6 +382,9 @@ var CatalystEndpoint = {
|
|
|
270
382
|
deleteStatus(id) {
|
|
271
383
|
return { path: `/catalyst/v1/status/${id}`, method: "DELETE" };
|
|
272
384
|
},
|
|
385
|
+
albumsInStatus(id) {
|
|
386
|
+
return { path: `/catalyst/v1/status/${id}/albums`, method: "GET" };
|
|
387
|
+
},
|
|
273
388
|
isFavorited(id) {
|
|
274
389
|
return { path: `/catalyst/v1/status/${id}/favorite`, method: "GET" };
|
|
275
390
|
},
|
|
@@ -282,690 +397,664 @@ var CatalystEndpoint = {
|
|
|
282
397
|
reactions(id) {
|
|
283
398
|
return { path: `/catalyst/v1/status/${id}/reactions`, method: "GET" };
|
|
284
399
|
},
|
|
285
|
-
|
|
286
|
-
return { path: `/catalyst/v1/status/${id}/albums`, method: "GET" };
|
|
287
|
-
},
|
|
288
|
-
react(id, symbol) {
|
|
400
|
+
reactWithCustomReaction(id, customReactionId) {
|
|
289
401
|
return {
|
|
290
|
-
path: `/catalyst/v1/status/${id}/reactions/${
|
|
402
|
+
path: `/catalyst/v1/status/${id}/reactions/custom/${customReactionId}`,
|
|
291
403
|
method: "POST"
|
|
292
404
|
};
|
|
293
405
|
},
|
|
294
|
-
|
|
406
|
+
unreactWithCustomReaction(id, customReactionId) {
|
|
295
407
|
return {
|
|
296
|
-
path: `/catalyst/v1/status/${id}/reactions/${
|
|
408
|
+
path: `/catalyst/v1/status/${id}/reactions/custom/${customReactionId}`,
|
|
297
409
|
method: "DELETE"
|
|
298
410
|
};
|
|
299
411
|
},
|
|
300
|
-
|
|
301
|
-
return {
|
|
302
|
-
path: `/catalyst/v1/timeline/contest/by/slug/${slug}`,
|
|
303
|
-
method: "GET",
|
|
304
|
-
queryParameters: buildTimelineParams(opts)
|
|
305
|
-
};
|
|
306
|
-
},
|
|
307
|
-
favoriteTimeline(opts = {}) {
|
|
308
|
-
return {
|
|
309
|
-
path: "/catalyst/v1/timeline/favorite",
|
|
310
|
-
method: "GET",
|
|
311
|
-
queryParameters: buildTimelineParams(opts)
|
|
312
|
-
};
|
|
313
|
-
},
|
|
314
|
-
firehoseTimeline(opts = {}) {
|
|
315
|
-
return {
|
|
316
|
-
path: "/catalyst/v1.1/timeline/firehose",
|
|
317
|
-
method: "GET",
|
|
318
|
-
queryParameters: buildTimelineParams(opts)
|
|
319
|
-
};
|
|
320
|
-
},
|
|
321
|
-
galleryTimeline(opts = {}) {
|
|
322
|
-
return {
|
|
323
|
-
path: "/catalyst/v1/timeline/gallery",
|
|
324
|
-
method: "GET",
|
|
325
|
-
queryParameters: buildTimelineParams(opts)
|
|
326
|
-
};
|
|
327
|
-
},
|
|
328
|
-
homeTimeline(opts = {}) {
|
|
329
|
-
return {
|
|
330
|
-
path: "/catalyst/v1.1/timeline/home",
|
|
331
|
-
method: "GET",
|
|
332
|
-
queryParameters: buildTimelineParams(opts)
|
|
333
|
-
};
|
|
334
|
-
},
|
|
335
|
-
searchTimeline(opts = {}) {
|
|
336
|
-
const params = {};
|
|
337
|
-
if (opts.q != null) params["q"] = opts.q;
|
|
338
|
-
if (opts.exact != null) params["exact"] = String(opts.exact);
|
|
339
|
-
if (opts.since != null) params["since"] = opts.since;
|
|
340
|
-
if (opts.until != null) params["until"] = opts.until;
|
|
341
|
-
return {
|
|
342
|
-
path: "/catalyst/v1/timeline/search",
|
|
343
|
-
method: "GET",
|
|
344
|
-
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
345
|
-
};
|
|
346
|
-
},
|
|
347
|
-
userTimeline(username, opts = {}) {
|
|
348
|
-
const params = {};
|
|
349
|
-
if (opts.trimUser != null) params["trim_user"] = String(opts.trimUser);
|
|
350
|
-
if (opts.excludeSensitive != null)
|
|
351
|
-
params["exclude_sensitive"] = String(opts.excludeSensitive);
|
|
352
|
-
if (opts.since != null) params["since"] = opts.since;
|
|
353
|
-
if (opts.until != null) params["until"] = opts.until;
|
|
412
|
+
react(id, symbol) {
|
|
354
413
|
return {
|
|
355
|
-
path: `/catalyst/v1/
|
|
356
|
-
method: "
|
|
357
|
-
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
414
|
+
path: `/catalyst/v1/status/${id}/reactions/${symbol}`,
|
|
415
|
+
method: "POST"
|
|
358
416
|
};
|
|
359
417
|
},
|
|
360
|
-
|
|
418
|
+
unreact(id, symbol) {
|
|
361
419
|
return {
|
|
362
|
-
path: `/catalyst/v1/
|
|
363
|
-
method: "
|
|
364
|
-
queryParameters: buildTimelineParams(opts)
|
|
420
|
+
path: `/catalyst/v1/status/${id}/reactions/${symbol}`,
|
|
421
|
+
method: "DELETE"
|
|
365
422
|
};
|
|
366
423
|
},
|
|
367
|
-
|
|
368
|
-
return { path: "/catalyst/v1/trend", method: "GET" };
|
|
369
|
-
},
|
|
370
|
-
createFleet(data) {
|
|
424
|
+
reportStatus(id, data) {
|
|
371
425
|
return {
|
|
372
|
-
path:
|
|
426
|
+
path: `/catalyst/v1/status/${id}/report`,
|
|
373
427
|
method: "POST",
|
|
374
428
|
body: data
|
|
375
429
|
};
|
|
376
430
|
},
|
|
377
|
-
|
|
431
|
+
// Bulk status reactions
|
|
432
|
+
bulkStatusReactions(ids) {
|
|
378
433
|
return {
|
|
379
|
-
path:
|
|
380
|
-
method: "
|
|
434
|
+
path: "/catalyst/v1/statuses/reactions",
|
|
435
|
+
method: "POST",
|
|
436
|
+
body: { ids }
|
|
381
437
|
};
|
|
382
438
|
},
|
|
383
|
-
|
|
439
|
+
// Relationships
|
|
440
|
+
follow(userId) {
|
|
384
441
|
return {
|
|
385
|
-
path:
|
|
386
|
-
method: "
|
|
442
|
+
path: "/catalyst/v1/relationships",
|
|
443
|
+
method: "POST",
|
|
444
|
+
body: { userId }
|
|
387
445
|
};
|
|
388
446
|
},
|
|
389
|
-
|
|
447
|
+
remove(userId) {
|
|
390
448
|
return {
|
|
391
|
-
path:
|
|
392
|
-
method: "
|
|
449
|
+
path: "/catalyst/v1/relationships",
|
|
450
|
+
method: "DELETE",
|
|
451
|
+
body: { userId }
|
|
393
452
|
};
|
|
394
453
|
},
|
|
395
|
-
|
|
454
|
+
relationshipCounts(username) {
|
|
396
455
|
return {
|
|
397
|
-
path: `/catalyst/v1/
|
|
456
|
+
path: `/catalyst/v1/relationships/by/username/${username}/counts`,
|
|
398
457
|
method: "GET"
|
|
399
458
|
};
|
|
400
459
|
},
|
|
401
|
-
|
|
402
|
-
return {
|
|
403
|
-
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
404
|
-
method: "POST"
|
|
405
|
-
};
|
|
406
|
-
},
|
|
407
|
-
unreactFleet(id, symbol) {
|
|
408
|
-
return {
|
|
409
|
-
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
410
|
-
method: "DELETE"
|
|
411
|
-
};
|
|
412
|
-
},
|
|
413
|
-
fleets() {
|
|
460
|
+
followers(username, opts) {
|
|
414
461
|
return {
|
|
415
|
-
path:
|
|
416
|
-
method: "GET"
|
|
462
|
+
path: `/catalyst/v1/relationships/by/username/${username}/followers`,
|
|
463
|
+
method: "GET",
|
|
464
|
+
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
417
465
|
};
|
|
418
466
|
},
|
|
419
|
-
|
|
467
|
+
followings(username, opts) {
|
|
420
468
|
return {
|
|
421
|
-
path: `/catalyst/v1/
|
|
422
|
-
method: "GET"
|
|
469
|
+
path: `/catalyst/v1/relationships/by/username/${username}/followings`,
|
|
470
|
+
method: "GET",
|
|
471
|
+
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
423
472
|
};
|
|
424
473
|
},
|
|
425
|
-
|
|
426
|
-
return {
|
|
427
|
-
path: "/catalyst/v1/contest",
|
|
428
|
-
method: "POST",
|
|
429
|
-
body: data
|
|
430
|
-
};
|
|
474
|
+
relationships(id) {
|
|
475
|
+
return { path: `/catalyst/v1/relationships/${id}`, method: "GET" };
|
|
431
476
|
},
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
method: "GET"
|
|
436
|
-
};
|
|
477
|
+
// Smart album
|
|
478
|
+
createSmartAlbum(data) {
|
|
479
|
+
return { path: "/catalyst/v1/smart-album", method: "POST", body: data };
|
|
437
480
|
},
|
|
438
|
-
|
|
481
|
+
getSmartAlbum(id, opts = {}) {
|
|
482
|
+
const params = {};
|
|
483
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
484
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
485
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
439
486
|
return {
|
|
440
|
-
path: `/catalyst/v1/
|
|
441
|
-
method: "GET"
|
|
487
|
+
path: `/catalyst/v1/smart-album/by/id/${id}`,
|
|
488
|
+
method: "GET",
|
|
489
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
442
490
|
};
|
|
443
491
|
},
|
|
444
|
-
|
|
492
|
+
editSmartAlbum(id, data) {
|
|
445
493
|
return {
|
|
446
|
-
path: `/catalyst/v1/
|
|
494
|
+
path: `/catalyst/v1/smart-album/by/id/${id}`,
|
|
447
495
|
method: "PATCH",
|
|
448
496
|
body: data
|
|
449
497
|
};
|
|
450
498
|
},
|
|
451
|
-
|
|
452
|
-
return {
|
|
453
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
|
|
454
|
-
method: "GET"
|
|
455
|
-
};
|
|
456
|
-
},
|
|
457
|
-
setContestAward(slug, id, data) {
|
|
458
|
-
return {
|
|
459
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
|
|
460
|
-
method: "POST",
|
|
461
|
-
body: data
|
|
462
|
-
};
|
|
463
|
-
},
|
|
464
|
-
unsetContestAward(slug, id, data) {
|
|
465
|
-
return {
|
|
466
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
|
|
467
|
-
method: "DELETE",
|
|
468
|
-
body: data
|
|
469
|
-
};
|
|
499
|
+
deleteSmartAlbum(id) {
|
|
500
|
+
return { path: `/catalyst/v1/smart-album/by/id/${id}`, method: "DELETE" };
|
|
470
501
|
},
|
|
471
|
-
|
|
472
|
-
return {
|
|
473
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
|
|
474
|
-
method: "GET"
|
|
475
|
-
};
|
|
502
|
+
getSmartAlbumBooks(id) {
|
|
503
|
+
return { path: `/catalyst/v1/smart-album/by/id/${id}/book`, method: "GET" };
|
|
476
504
|
},
|
|
477
|
-
|
|
505
|
+
createSmartAlbumBook(id, data) {
|
|
478
506
|
return {
|
|
479
|
-
path: `/catalyst/v1/
|
|
507
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book`,
|
|
480
508
|
method: "POST",
|
|
481
509
|
body: data
|
|
482
510
|
};
|
|
483
511
|
},
|
|
484
|
-
|
|
485
|
-
return {
|
|
486
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
|
|
487
|
-
method: "DELETE",
|
|
488
|
-
body: data
|
|
489
|
-
};
|
|
490
|
-
},
|
|
491
|
-
copyContest(slug) {
|
|
492
|
-
return {
|
|
493
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
|
|
494
|
-
method: "POST"
|
|
495
|
-
};
|
|
496
|
-
},
|
|
497
|
-
getAccessPermissionOfContest(slug) {
|
|
512
|
+
getSmartAlbumBook(id, bookId) {
|
|
498
513
|
return {
|
|
499
|
-
path: `/catalyst/v1/
|
|
514
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book/${bookId}`,
|
|
500
515
|
method: "GET"
|
|
501
516
|
};
|
|
502
517
|
},
|
|
503
|
-
|
|
518
|
+
regenerateSmartAlbumBook(id, bookId) {
|
|
504
519
|
return {
|
|
505
|
-
path: `/catalyst/v1/
|
|
506
|
-
method: "GET"
|
|
507
|
-
};
|
|
508
|
-
},
|
|
509
|
-
publishContest(slug) {
|
|
510
|
-
return {
|
|
511
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
|
|
520
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book/${bookId}/regenerate`,
|
|
512
521
|
method: "POST"
|
|
513
522
|
};
|
|
514
523
|
},
|
|
515
|
-
|
|
516
|
-
return {
|
|
517
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
|
|
518
|
-
method: "POST"
|
|
519
|
-
};
|
|
524
|
+
listSmartAlbumsByUser(userId) {
|
|
525
|
+
return { path: `/catalyst/v1/smart-album/by/user/${userId}`, method: "GET" };
|
|
520
526
|
},
|
|
521
|
-
|
|
527
|
+
searchSmartAlbums(q) {
|
|
522
528
|
return {
|
|
523
|
-
path:
|
|
524
|
-
method: "
|
|
529
|
+
path: "/catalyst/v1/smart-album/search",
|
|
530
|
+
method: "GET",
|
|
531
|
+
queryParameters: q != null ? { q } : void 0
|
|
525
532
|
};
|
|
526
533
|
},
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
534
|
+
// Timelines
|
|
535
|
+
archiveTimeline(opts) {
|
|
536
|
+
const params = {
|
|
537
|
+
year: String(opts.year),
|
|
538
|
+
month: String(opts.month)
|
|
531
539
|
};
|
|
532
|
-
|
|
533
|
-
|
|
540
|
+
if (opts.day != null) params["day"] = String(opts.day);
|
|
541
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
542
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
543
|
+
if (opts.userId != null) params["userId"] = opts.userId;
|
|
544
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
545
|
+
if (opts.excludeSensitive != null)
|
|
546
|
+
params["excludeSensitive"] = String(opts.excludeSensitive);
|
|
534
547
|
return {
|
|
535
|
-
path: "/catalyst/v1/
|
|
548
|
+
path: "/catalyst/v1/timeline/archive",
|
|
536
549
|
method: "GET",
|
|
537
|
-
queryParameters:
|
|
538
|
-
};
|
|
539
|
-
},
|
|
540
|
-
reportStatus(id, data) {
|
|
541
|
-
return {
|
|
542
|
-
path: `/catalyst/v1/status/${id}/report`,
|
|
543
|
-
method: "POST",
|
|
544
|
-
body: data
|
|
550
|
+
queryParameters: params
|
|
545
551
|
};
|
|
546
552
|
},
|
|
547
|
-
|
|
548
|
-
return {
|
|
549
|
-
path: "/catalyst/v1/privacy/settings",
|
|
550
|
-
method: "GET"
|
|
551
|
-
};
|
|
553
|
+
archiveMonths() {
|
|
554
|
+
return { path: "/catalyst/v1/timeline/archive/months", method: "GET" };
|
|
552
555
|
},
|
|
553
|
-
|
|
556
|
+
timelineByContestSlug(slug, opts = {}) {
|
|
554
557
|
return {
|
|
555
|
-
path:
|
|
556
|
-
method: "
|
|
557
|
-
|
|
558
|
+
path: `/catalyst/v1/timeline/contest/by/slug/${slug}`,
|
|
559
|
+
method: "GET",
|
|
560
|
+
queryParameters: buildTimelineParams(opts)
|
|
558
561
|
};
|
|
559
562
|
},
|
|
560
|
-
|
|
561
|
-
announcements() {
|
|
562
|
-
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
563
|
-
},
|
|
564
|
-
// Profile Tags
|
|
565
|
-
updateProfileTags(data) {
|
|
566
|
-
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
567
|
-
},
|
|
568
|
-
profileTagSuggestions(q) {
|
|
563
|
+
favoriteTimeline(opts = {}) {
|
|
569
564
|
return {
|
|
570
|
-
path: "/catalyst/v1/
|
|
565
|
+
path: "/catalyst/v1/timeline/favorite",
|
|
571
566
|
method: "GET",
|
|
572
|
-
queryParameters:
|
|
567
|
+
queryParameters: buildTimelineParams(opts)
|
|
573
568
|
};
|
|
574
569
|
},
|
|
575
|
-
|
|
570
|
+
firehoseTimelineV1(opts = {}) {
|
|
576
571
|
return {
|
|
577
|
-
path:
|
|
572
|
+
path: "/catalyst/v1/timeline/firehose",
|
|
578
573
|
method: "GET",
|
|
579
|
-
queryParameters:
|
|
574
|
+
queryParameters: buildTimelineParams(opts)
|
|
580
575
|
};
|
|
581
576
|
},
|
|
582
|
-
|
|
577
|
+
galleryTimeline(opts = {}) {
|
|
583
578
|
return {
|
|
584
|
-
path:
|
|
585
|
-
method: "GET"
|
|
579
|
+
path: "/catalyst/v1/timeline/gallery",
|
|
580
|
+
method: "GET",
|
|
581
|
+
queryParameters: buildTimelineParams(opts)
|
|
586
582
|
};
|
|
587
583
|
},
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
return { path: "/catalyst/v1/random", method: "GET" };
|
|
584
|
+
homeTimelineV1() {
|
|
585
|
+
return { path: "/catalyst/v1/timeline/home", method: "GET" };
|
|
591
586
|
},
|
|
592
|
-
|
|
587
|
+
searchTimeline(opts = {}) {
|
|
588
|
+
const params = {};
|
|
589
|
+
if (opts.q != null) params["q"] = opts.q;
|
|
590
|
+
if (opts.exact != null) params["exact"] = String(opts.exact);
|
|
591
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
592
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
593
593
|
return {
|
|
594
|
-
path: "/catalyst/v1/
|
|
594
|
+
path: "/catalyst/v1/timeline/search",
|
|
595
595
|
method: "GET",
|
|
596
|
-
queryParameters:
|
|
597
|
-
};
|
|
598
|
-
},
|
|
599
|
-
// Bulk reactions
|
|
600
|
-
bulkStatusReactions(ids) {
|
|
601
|
-
return {
|
|
602
|
-
path: "/catalyst/v1/statuses/reactions",
|
|
603
|
-
method: "POST",
|
|
604
|
-
body: { ids }
|
|
596
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
605
597
|
};
|
|
606
598
|
},
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
const params = {
|
|
610
|
-
year: String(opts.year),
|
|
611
|
-
month: String(opts.month)
|
|
612
|
-
};
|
|
613
|
-
if (opts.day != null) params["day"] = String(opts.day);
|
|
599
|
+
userTimeline(username, opts = {}) {
|
|
600
|
+
const params = {};
|
|
614
601
|
if (opts.since != null) params["since"] = opts.since;
|
|
615
602
|
if (opts.until != null) params["until"] = opts.until;
|
|
616
|
-
if (opts.userId != null) params["userId"] = opts.userId;
|
|
617
603
|
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
618
|
-
if (opts.trimUser != null) params["trimUser"] = String(opts.trimUser);
|
|
619
604
|
if (opts.excludeSensitive != null)
|
|
620
|
-
params["
|
|
605
|
+
params["exclude_sensitive"] = String(opts.excludeSensitive);
|
|
621
606
|
return {
|
|
622
|
-
path:
|
|
607
|
+
path: `/catalyst/v1/timeline/user/by/username/${username}`,
|
|
623
608
|
method: "GET",
|
|
624
|
-
queryParameters: params
|
|
609
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
625
610
|
};
|
|
626
611
|
},
|
|
627
|
-
|
|
628
|
-
return {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
612
|
+
userGalleryTimeline(username, opts = {}) {
|
|
613
|
+
return {
|
|
614
|
+
path: `/catalyst/v1/timeline/user/by/username/${username}/gallery`,
|
|
615
|
+
method: "GET",
|
|
616
|
+
queryParameters: buildTimelineParams(opts)
|
|
617
|
+
};
|
|
633
618
|
},
|
|
634
|
-
|
|
619
|
+
firehoseTimeline(opts = {}) {
|
|
620
|
+
const params = {};
|
|
621
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
622
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
623
|
+
if (opts.trimVisitor != null) params["trim_visitor"] = String(opts.trimVisitor);
|
|
635
624
|
return {
|
|
636
|
-
path:
|
|
637
|
-
method: "GET"
|
|
625
|
+
path: "/catalyst/v1.1/timeline/firehose",
|
|
626
|
+
method: "GET",
|
|
627
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
638
628
|
};
|
|
639
629
|
},
|
|
640
|
-
|
|
641
|
-
|
|
630
|
+
homeTimeline(opts = {}) {
|
|
631
|
+
const params = {};
|
|
632
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
633
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
634
|
+
if (opts.trimVisitor != null) params["trim_visitor"] = String(opts.trimVisitor);
|
|
642
635
|
return {
|
|
643
|
-
path: "/catalyst/v1/
|
|
636
|
+
path: "/catalyst/v1.1/timeline/home",
|
|
644
637
|
method: "GET",
|
|
645
|
-
queryParameters:
|
|
638
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
646
639
|
};
|
|
647
640
|
},
|
|
648
|
-
//
|
|
649
|
-
|
|
641
|
+
// Trend
|
|
642
|
+
trend() {
|
|
643
|
+
return { path: "/catalyst/v1/trend", method: "GET" };
|
|
644
|
+
},
|
|
645
|
+
richTrend() {
|
|
650
646
|
return {
|
|
651
|
-
path:
|
|
652
|
-
method: "GET"
|
|
647
|
+
path: "/catalyst/v1/trend",
|
|
648
|
+
method: "GET",
|
|
649
|
+
queryParameters: { format: "rich" }
|
|
653
650
|
};
|
|
654
651
|
}
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
// src/clients/catalystClient.ts
|
|
658
|
-
var CatalystClient = class {
|
|
659
|
-
constructor(http) {
|
|
660
|
-
this.http = http;
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
// src/clients/catalystClient.ts
|
|
655
|
+
var CatalystClient = class {
|
|
656
|
+
constructor(http) {
|
|
657
|
+
this.http = http;
|
|
658
|
+
}
|
|
659
|
+
// Albums
|
|
660
|
+
createAlbum(data) {
|
|
661
|
+
return this.http.request(CatalystEndpoint.createAlbum(data));
|
|
662
|
+
}
|
|
663
|
+
getAlbum(id, opts = {}) {
|
|
664
|
+
return this.http.request(CatalystEndpoint.getAlbum(id, opts));
|
|
665
|
+
}
|
|
666
|
+
insertToAlbum(id, statusId) {
|
|
667
|
+
return this.http.request(CatalystEndpoint.insertToAlbum(id, statusId));
|
|
668
|
+
}
|
|
669
|
+
removeFromAlbum(id, statusId) {
|
|
670
|
+
return this.http.request(CatalystEndpoint.removeFromAlbum(id, statusId));
|
|
671
|
+
}
|
|
672
|
+
editAlbum(id, data) {
|
|
673
|
+
return this.http.request(CatalystEndpoint.editAlbum(id, data));
|
|
674
|
+
}
|
|
675
|
+
deleteAlbum(id) {
|
|
676
|
+
return this.http.request(CatalystEndpoint.deleteAlbum(id));
|
|
677
|
+
}
|
|
678
|
+
getAlbumBooks(id) {
|
|
679
|
+
return this.http.request(CatalystEndpoint.getAlbumBooks(id));
|
|
680
|
+
}
|
|
681
|
+
createAlbumBook(id, data) {
|
|
682
|
+
return this.http.request(CatalystEndpoint.createAlbumBook(id, data));
|
|
683
|
+
}
|
|
684
|
+
getAlbumBook(id, bookId) {
|
|
685
|
+
return this.http.request(CatalystEndpoint.getAlbumBook(id, bookId));
|
|
686
|
+
}
|
|
687
|
+
regenerateAlbumBook(id, bookId) {
|
|
688
|
+
return this.http.request(CatalystEndpoint.regenerateAlbumBook(id, bookId));
|
|
689
|
+
}
|
|
690
|
+
async getAlbumsByMe(includeSmartAlbums = false) {
|
|
691
|
+
const response = await this.http.request(
|
|
692
|
+
CatalystEndpoint.getAlbumsByMe(includeSmartAlbums)
|
|
693
|
+
);
|
|
694
|
+
return response.albums;
|
|
695
|
+
}
|
|
696
|
+
async listAlbums(username, includeSmartAlbum = true) {
|
|
697
|
+
const response = await this.http.request(
|
|
698
|
+
CatalystEndpoint.listAlbums(username, includeSmartAlbum)
|
|
699
|
+
);
|
|
700
|
+
return response.albums;
|
|
701
|
+
}
|
|
702
|
+
async searchAlbums(q, includeSmartAlbum = true, until) {
|
|
703
|
+
const response = await this.http.request(
|
|
704
|
+
CatalystEndpoint.searchAlbums(q, includeSmartAlbum, until)
|
|
705
|
+
);
|
|
706
|
+
return response.albums;
|
|
707
|
+
}
|
|
708
|
+
// Announcements
|
|
709
|
+
async announcements() {
|
|
710
|
+
const response = await this.http.request(
|
|
711
|
+
CatalystEndpoint.announcements()
|
|
712
|
+
);
|
|
713
|
+
return response.announcements;
|
|
661
714
|
}
|
|
662
|
-
//
|
|
663
|
-
|
|
664
|
-
return this.http.request(CatalystEndpoint.
|
|
715
|
+
// Blocks
|
|
716
|
+
block(userId) {
|
|
717
|
+
return this.http.request(CatalystEndpoint.block(userId));
|
|
665
718
|
}
|
|
666
|
-
|
|
667
|
-
return this.http.request(CatalystEndpoint.
|
|
719
|
+
unblock(userId) {
|
|
720
|
+
return this.http.request(CatalystEndpoint.unblock(userId));
|
|
668
721
|
}
|
|
669
|
-
|
|
670
|
-
|
|
722
|
+
// Contest
|
|
723
|
+
// NOTE: the spec only exposes read + vote operations for contests; contest management
|
|
724
|
+
// (create/edit/awards/collaborators/copy/dashboard/publish/polls) is no longer part of the API.
|
|
725
|
+
async getContestsByMe() {
|
|
726
|
+
const response = await this.http.request(
|
|
727
|
+
CatalystEndpoint.getContestsByMe()
|
|
728
|
+
);
|
|
729
|
+
return response.contests;
|
|
671
730
|
}
|
|
672
|
-
|
|
673
|
-
|
|
731
|
+
async getContestBySlug(slug) {
|
|
732
|
+
const response = await this.http.request(
|
|
733
|
+
CatalystEndpoint.getContestBySlug(slug)
|
|
734
|
+
);
|
|
735
|
+
return response.contest;
|
|
674
736
|
}
|
|
675
|
-
|
|
676
|
-
|
|
737
|
+
async contestTimeline(slug) {
|
|
738
|
+
const response = await this.http.request(
|
|
739
|
+
CatalystEndpoint.contestTimeline(slug)
|
|
740
|
+
);
|
|
741
|
+
return response.statuses;
|
|
677
742
|
}
|
|
678
|
-
|
|
679
|
-
return this.http.
|
|
743
|
+
getContestVotes(slug) {
|
|
744
|
+
return this.http.request(CatalystEndpoint.getContestVotes(slug));
|
|
680
745
|
}
|
|
681
|
-
|
|
682
|
-
return this.http.request(
|
|
683
|
-
|
|
746
|
+
addContestVote(slug, status) {
|
|
747
|
+
return this.http.request(CatalystEndpoint.addContestVote(slug, status));
|
|
748
|
+
}
|
|
749
|
+
removeContestVote(slug, status) {
|
|
750
|
+
return this.http.request(CatalystEndpoint.removeContestVote(slug, status));
|
|
751
|
+
}
|
|
752
|
+
async getContestsByUser(userId) {
|
|
753
|
+
const response = await this.http.request(
|
|
754
|
+
CatalystEndpoint.getContestsByUser(userId)
|
|
684
755
|
);
|
|
756
|
+
return response.contests;
|
|
685
757
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
CatalystEndpoint.
|
|
758
|
+
async currentContests() {
|
|
759
|
+
const response = await this.http.request(
|
|
760
|
+
CatalystEndpoint.currentContests()
|
|
761
|
+
);
|
|
762
|
+
return response.contests;
|
|
763
|
+
}
|
|
764
|
+
async searchContests(q, state, id) {
|
|
765
|
+
const response = await this.http.request(
|
|
766
|
+
CatalystEndpoint.searchContests(q, state, id)
|
|
689
767
|
);
|
|
768
|
+
return response.contests;
|
|
690
769
|
}
|
|
691
|
-
//
|
|
770
|
+
// Custom reactions
|
|
692
771
|
customReactions() {
|
|
693
772
|
return this.http.request(CatalystEndpoint.customReactions());
|
|
694
773
|
}
|
|
695
|
-
|
|
696
|
-
return this.http.request(CatalystEndpoint.
|
|
774
|
+
getCustomUserReactions() {
|
|
775
|
+
return this.http.request(CatalystEndpoint.getCustomUserReactions());
|
|
697
776
|
}
|
|
777
|
+
/**
|
|
778
|
+
* Creates a custom reaction. `data` must include the `image`, `shortcode`, `displayName` and
|
|
779
|
+
* `visibility` ("private" | "followers" | "public") fields as multipart form fields.
|
|
780
|
+
*/
|
|
698
781
|
createCustomReaction(data) {
|
|
699
782
|
return this.http.request(CatalystEndpoint.createCustomReaction(data));
|
|
700
783
|
}
|
|
701
784
|
updateCustomReaction(id, data) {
|
|
702
|
-
return this.http.
|
|
785
|
+
return this.http.request(CatalystEndpoint.updateCustomReaction(id, data));
|
|
703
786
|
}
|
|
704
787
|
deleteCustomReaction(id) {
|
|
705
788
|
return this.http.requestVoid(CatalystEndpoint.deleteCustomReaction(id));
|
|
706
789
|
}
|
|
707
|
-
//
|
|
708
|
-
|
|
709
|
-
return this.http.
|
|
790
|
+
// Fleet
|
|
791
|
+
createFleet(data) {
|
|
792
|
+
return this.http.request(CatalystEndpoint.createFleet(data));
|
|
710
793
|
}
|
|
711
|
-
|
|
712
|
-
return this.http.
|
|
794
|
+
fleetByUsername(username) {
|
|
795
|
+
return this.http.request(CatalystEndpoint.fleetByUsername(username));
|
|
713
796
|
}
|
|
714
|
-
|
|
715
|
-
return this.http.request(CatalystEndpoint.
|
|
797
|
+
fleets() {
|
|
798
|
+
return this.http.request(CatalystEndpoint.fleets());
|
|
716
799
|
}
|
|
717
|
-
|
|
718
|
-
return this.http.
|
|
800
|
+
fleetById(id) {
|
|
801
|
+
return this.http.request(CatalystEndpoint.fleetById(id));
|
|
719
802
|
}
|
|
720
|
-
|
|
721
|
-
return this.http.
|
|
803
|
+
deleteFleet(id) {
|
|
804
|
+
return this.http.request(CatalystEndpoint.deleteFleet(id));
|
|
722
805
|
}
|
|
723
|
-
|
|
724
|
-
return this.http.request(CatalystEndpoint.
|
|
806
|
+
reactFleet(id, symbol) {
|
|
807
|
+
return this.http.request(CatalystEndpoint.reactFleet(id, symbol));
|
|
725
808
|
}
|
|
726
|
-
|
|
727
|
-
return this.http.request(CatalystEndpoint.
|
|
809
|
+
unreactFleet(id, symbol) {
|
|
810
|
+
return this.http.request(CatalystEndpoint.unreactFleet(id, symbol));
|
|
728
811
|
}
|
|
729
|
-
|
|
730
|
-
return this.http.request(CatalystEndpoint.
|
|
812
|
+
viewFleet(id) {
|
|
813
|
+
return this.http.request(CatalystEndpoint.viewFleet(id));
|
|
731
814
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
return this.http.request(CatalystEndpoint.createSmartAlbum(data));
|
|
815
|
+
fleetViewers(id) {
|
|
816
|
+
return this.http.request(CatalystEndpoint.fleetViewers(id));
|
|
735
817
|
}
|
|
736
|
-
|
|
737
|
-
|
|
818
|
+
// Privacy
|
|
819
|
+
getPrivacySettings() {
|
|
820
|
+
return this.http.request(CatalystEndpoint.getPrivacySettings());
|
|
738
821
|
}
|
|
739
|
-
|
|
740
|
-
return this.http.
|
|
822
|
+
updatePrivacySettings(data) {
|
|
823
|
+
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
741
824
|
}
|
|
742
|
-
|
|
743
|
-
|
|
825
|
+
// Profile tags
|
|
826
|
+
async updateProfileTags(data) {
|
|
827
|
+
const response = await this.http.request(
|
|
828
|
+
CatalystEndpoint.updateProfileTags(data)
|
|
829
|
+
);
|
|
830
|
+
return response.tags;
|
|
831
|
+
}
|
|
832
|
+
async profileTagSuggestions(q) {
|
|
833
|
+
const response = await this.http.request(
|
|
834
|
+
CatalystEndpoint.profileTagSuggestions(q)
|
|
835
|
+
);
|
|
836
|
+
return response.tags;
|
|
837
|
+
}
|
|
838
|
+
getUsersByProfileTag(name, cursor) {
|
|
839
|
+
return this.http.request(CatalystEndpoint.getUsersByProfileTag(name, cursor));
|
|
840
|
+
}
|
|
841
|
+
async getProfileTagsByUser(id) {
|
|
842
|
+
const response = await this.http.request(
|
|
843
|
+
CatalystEndpoint.getProfileTagsByUser(id)
|
|
844
|
+
);
|
|
845
|
+
return response.tags;
|
|
846
|
+
}
|
|
847
|
+
// Random
|
|
848
|
+
async randomStatus() {
|
|
849
|
+
const response = await this.http.request(
|
|
850
|
+
CatalystEndpoint.randomStatus()
|
|
851
|
+
);
|
|
852
|
+
return response.status;
|
|
853
|
+
}
|
|
854
|
+
randomStatusV1_1() {
|
|
855
|
+
return this.http.request(CatalystEndpoint.randomStatusV1_1());
|
|
744
856
|
}
|
|
745
|
-
|
|
746
|
-
return this.http.request(CatalystEndpoint.
|
|
857
|
+
onThisDay() {
|
|
858
|
+
return this.http.request(CatalystEndpoint.onThisDay());
|
|
747
859
|
}
|
|
748
|
-
//
|
|
860
|
+
// Status
|
|
749
861
|
createStatus(data) {
|
|
750
862
|
return this.http.request(CatalystEndpoint.createStatus(data));
|
|
751
863
|
}
|
|
752
|
-
getStatus(id) {
|
|
753
|
-
|
|
864
|
+
async getStatus(id) {
|
|
865
|
+
const response = await this.http.request(
|
|
866
|
+
CatalystEndpoint.getStatus(id)
|
|
867
|
+
);
|
|
868
|
+
return response.status;
|
|
754
869
|
}
|
|
755
|
-
|
|
756
|
-
|
|
870
|
+
async getStatusV1_1(id) {
|
|
871
|
+
const response = await this.http.request(
|
|
872
|
+
CatalystEndpoint.getStatusV1_1(id)
|
|
873
|
+
);
|
|
874
|
+
return response.status;
|
|
875
|
+
}
|
|
876
|
+
editStatus(id, description) {
|
|
877
|
+
return this.http.request(
|
|
878
|
+
CatalystEndpoint.editStatus(id, { description })
|
|
879
|
+
);
|
|
757
880
|
}
|
|
758
881
|
deleteStatus(id) {
|
|
759
|
-
return this.http.
|
|
882
|
+
return this.http.request(CatalystEndpoint.deleteStatus(id));
|
|
883
|
+
}
|
|
884
|
+
async albumsInStatus(id) {
|
|
885
|
+
const response = await this.http.request(
|
|
886
|
+
CatalystEndpoint.albumsInStatus(id)
|
|
887
|
+
);
|
|
888
|
+
return response.albums;
|
|
760
889
|
}
|
|
761
890
|
isFavorited(id) {
|
|
762
891
|
return this.http.request(CatalystEndpoint.isFavorited(id));
|
|
763
892
|
}
|
|
764
893
|
favorite(id) {
|
|
765
|
-
return this.http.
|
|
894
|
+
return this.http.request(CatalystEndpoint.favorite(id));
|
|
766
895
|
}
|
|
767
896
|
unfavorite(id) {
|
|
768
|
-
return this.http.
|
|
897
|
+
return this.http.request(CatalystEndpoint.unfavorite(id));
|
|
769
898
|
}
|
|
770
|
-
reactions(id) {
|
|
771
|
-
|
|
899
|
+
async reactions(id) {
|
|
900
|
+
const response = await this.http.request(
|
|
901
|
+
CatalystEndpoint.reactions(id)
|
|
902
|
+
);
|
|
903
|
+
return response.reactions;
|
|
772
904
|
}
|
|
773
|
-
|
|
774
|
-
return this.http.
|
|
905
|
+
reactWithCustomReaction(id, customReactionId) {
|
|
906
|
+
return this.http.requestVoid(
|
|
907
|
+
CatalystEndpoint.reactWithCustomReaction(id, customReactionId)
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
unreactWithCustomReaction(id, customReactionId) {
|
|
911
|
+
return this.http.requestVoid(
|
|
912
|
+
CatalystEndpoint.unreactWithCustomReaction(id, customReactionId)
|
|
913
|
+
);
|
|
775
914
|
}
|
|
776
915
|
react(id, symbol) {
|
|
777
|
-
return this.http.
|
|
916
|
+
return this.http.request(CatalystEndpoint.react(id, symbol));
|
|
778
917
|
}
|
|
779
918
|
unreact(id, symbol) {
|
|
780
|
-
return this.http.
|
|
781
|
-
}
|
|
782
|
-
// Timelines
|
|
783
|
-
contestTimeline(slug, opts = {}) {
|
|
784
|
-
return this.http.request(CatalystEndpoint.contestTimeline(slug, opts));
|
|
785
|
-
}
|
|
786
|
-
favoriteTimeline(opts = {}) {
|
|
787
|
-
return this.http.request(CatalystEndpoint.favoriteTimeline(opts));
|
|
788
|
-
}
|
|
789
|
-
firehoseTimeline(opts = {}) {
|
|
790
|
-
return this.http.request(CatalystEndpoint.firehoseTimeline(opts));
|
|
791
|
-
}
|
|
792
|
-
galleryTimeline(opts = {}) {
|
|
793
|
-
return this.http.request(CatalystEndpoint.galleryTimeline(opts));
|
|
794
|
-
}
|
|
795
|
-
homeTimeline(opts = {}) {
|
|
796
|
-
return this.http.request(CatalystEndpoint.homeTimeline(opts));
|
|
797
|
-
}
|
|
798
|
-
searchTimeline(opts = {}) {
|
|
799
|
-
return this.http.request(CatalystEndpoint.searchTimeline(opts));
|
|
800
|
-
}
|
|
801
|
-
userTimeline(username, opts = {}) {
|
|
802
|
-
return this.http.request(CatalystEndpoint.userTimeline(username, opts));
|
|
919
|
+
return this.http.request(CatalystEndpoint.unreact(id, symbol));
|
|
803
920
|
}
|
|
804
|
-
|
|
805
|
-
return this.http.request(
|
|
806
|
-
CatalystEndpoint.userGalleryTimeline(username, opts)
|
|
807
|
-
);
|
|
921
|
+
reportStatus(id, data) {
|
|
922
|
+
return this.http.request(CatalystEndpoint.reportStatus(id, data));
|
|
808
923
|
}
|
|
809
|
-
|
|
810
|
-
|
|
924
|
+
// Bulk status reactions
|
|
925
|
+
async bulkStatusReactions(ids) {
|
|
926
|
+
const response = await this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
927
|
+
return response.reactions;
|
|
811
928
|
}
|
|
812
|
-
|
|
813
|
-
|
|
929
|
+
// Relationships
|
|
930
|
+
follow(userId) {
|
|
931
|
+
return this.http.request(CatalystEndpoint.follow(userId));
|
|
814
932
|
}
|
|
815
|
-
|
|
816
|
-
return this.http.request(CatalystEndpoint.
|
|
933
|
+
remove(userId) {
|
|
934
|
+
return this.http.request(CatalystEndpoint.remove(userId));
|
|
817
935
|
}
|
|
818
|
-
|
|
819
|
-
return this.http.
|
|
936
|
+
relationshipCounts(username) {
|
|
937
|
+
return this.http.request(CatalystEndpoint.relationshipCounts(username));
|
|
820
938
|
}
|
|
821
|
-
|
|
822
|
-
return this.http.
|
|
939
|
+
followers(username, opts) {
|
|
940
|
+
return this.http.request(CatalystEndpoint.followers(username, opts));
|
|
823
941
|
}
|
|
824
|
-
|
|
825
|
-
return this.http.request(CatalystEndpoint.
|
|
942
|
+
followings(username, opts) {
|
|
943
|
+
return this.http.request(CatalystEndpoint.followings(username, opts));
|
|
826
944
|
}
|
|
827
|
-
|
|
828
|
-
return this.http.
|
|
945
|
+
relationships(id) {
|
|
946
|
+
return this.http.request(CatalystEndpoint.relationships(id));
|
|
829
947
|
}
|
|
830
|
-
|
|
831
|
-
|
|
948
|
+
// Smart albums
|
|
949
|
+
createSmartAlbum(data) {
|
|
950
|
+
return this.http.request(CatalystEndpoint.createSmartAlbum(data));
|
|
832
951
|
}
|
|
833
|
-
|
|
834
|
-
return this.http.request(CatalystEndpoint.
|
|
952
|
+
getSmartAlbum(id, opts = {}) {
|
|
953
|
+
return this.http.request(CatalystEndpoint.getSmartAlbum(id, opts));
|
|
835
954
|
}
|
|
836
|
-
|
|
837
|
-
return this.http.request(CatalystEndpoint.
|
|
955
|
+
editSmartAlbum(id, data) {
|
|
956
|
+
return this.http.request(CatalystEndpoint.editSmartAlbum(id, data));
|
|
838
957
|
}
|
|
839
|
-
|
|
840
|
-
return this.http.request(CatalystEndpoint.
|
|
958
|
+
deleteSmartAlbum(id) {
|
|
959
|
+
return this.http.request(CatalystEndpoint.deleteSmartAlbum(id));
|
|
841
960
|
}
|
|
842
|
-
|
|
843
|
-
return this.http.request(CatalystEndpoint.
|
|
961
|
+
getSmartAlbumBooks(id) {
|
|
962
|
+
return this.http.request(CatalystEndpoint.getSmartAlbumBooks(id));
|
|
844
963
|
}
|
|
845
|
-
|
|
846
|
-
return this.http.request(CatalystEndpoint.
|
|
964
|
+
createSmartAlbumBook(id, data) {
|
|
965
|
+
return this.http.request(CatalystEndpoint.createSmartAlbumBook(id, data));
|
|
847
966
|
}
|
|
848
|
-
|
|
849
|
-
return this.http.
|
|
967
|
+
getSmartAlbumBook(id, bookId) {
|
|
968
|
+
return this.http.request(CatalystEndpoint.getSmartAlbumBook(id, bookId));
|
|
850
969
|
}
|
|
851
|
-
|
|
852
|
-
return this.http.request(CatalystEndpoint.
|
|
970
|
+
regenerateSmartAlbumBook(id, bookId) {
|
|
971
|
+
return this.http.request(CatalystEndpoint.regenerateSmartAlbumBook(id, bookId));
|
|
853
972
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
CatalystEndpoint.
|
|
973
|
+
async listSmartAlbumsByUser(userId) {
|
|
974
|
+
const response = await this.http.request(
|
|
975
|
+
CatalystEndpoint.listSmartAlbumsByUser(userId)
|
|
857
976
|
);
|
|
977
|
+
return response.albums;
|
|
858
978
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
CatalystEndpoint.
|
|
979
|
+
async searchSmartAlbums(q) {
|
|
980
|
+
const response = await this.http.request(
|
|
981
|
+
CatalystEndpoint.searchSmartAlbums(q)
|
|
862
982
|
);
|
|
983
|
+
return response.albums;
|
|
863
984
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
return this.http.requestVoid(
|
|
869
|
-
CatalystEndpoint.addContestCollaborator(slug, data)
|
|
985
|
+
// Timelines
|
|
986
|
+
async archiveTimeline(opts) {
|
|
987
|
+
const response = await this.http.request(
|
|
988
|
+
CatalystEndpoint.archiveTimeline(opts)
|
|
870
989
|
);
|
|
990
|
+
return response.statuses;
|
|
871
991
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
CatalystEndpoint.
|
|
992
|
+
async archiveMonths() {
|
|
993
|
+
const response = await this.http.request(
|
|
994
|
+
CatalystEndpoint.archiveMonths()
|
|
875
995
|
);
|
|
996
|
+
return response.months;
|
|
876
997
|
}
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
getAccessPermissionOfContest(slug) {
|
|
881
|
-
return this.http.request(
|
|
882
|
-
CatalystEndpoint.getAccessPermissionOfContest(slug)
|
|
998
|
+
async timelineByContestSlug(slug, opts = {}) {
|
|
999
|
+
const response = await this.http.request(
|
|
1000
|
+
CatalystEndpoint.timelineByContestSlug(slug, opts)
|
|
883
1001
|
);
|
|
1002
|
+
return response.statuses;
|
|
884
1003
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
addContestVoteToStatus(slug, id) {
|
|
889
|
-
return this.http.requestVoid(
|
|
890
|
-
CatalystEndpoint.addContestVoteToStatus(slug, id)
|
|
1004
|
+
async favoriteTimeline(opts = {}) {
|
|
1005
|
+
const response = await this.http.request(
|
|
1006
|
+
CatalystEndpoint.favoriteTimeline(opts)
|
|
891
1007
|
);
|
|
1008
|
+
return response.statuses;
|
|
892
1009
|
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
CatalystEndpoint.
|
|
1010
|
+
async firehoseTimelineV1(opts = {}) {
|
|
1011
|
+
const response = await this.http.request(
|
|
1012
|
+
CatalystEndpoint.firehoseTimelineV1(opts)
|
|
896
1013
|
);
|
|
1014
|
+
return response.statuses;
|
|
897
1015
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
searchContest(state, q) {
|
|
902
|
-
return this.http.request(CatalystEndpoint.searchContest(state, q));
|
|
903
|
-
}
|
|
904
|
-
// report
|
|
905
|
-
reportStatus(id, data) {
|
|
906
|
-
return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
|
|
907
|
-
}
|
|
908
|
-
// privacy
|
|
909
|
-
getPrivacySettings() {
|
|
910
|
-
return this.http.request(CatalystEndpoint.getPrivacySettings());
|
|
911
|
-
}
|
|
912
|
-
updatePrivacySettings(data) {
|
|
913
|
-
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
914
|
-
}
|
|
915
|
-
// announcements
|
|
916
|
-
announcements() {
|
|
917
|
-
return this.http.request(CatalystEndpoint.announcements());
|
|
918
|
-
}
|
|
919
|
-
// profile tags
|
|
920
|
-
updateProfileTags(data) {
|
|
921
|
-
return this.http.request(CatalystEndpoint.updateProfileTags(data));
|
|
922
|
-
}
|
|
923
|
-
profileTagSuggestions(q) {
|
|
924
|
-
return this.http.request(CatalystEndpoint.profileTagSuggestions(q));
|
|
925
|
-
}
|
|
926
|
-
getUsersByProfileTag(name, cursor) {
|
|
927
|
-
return this.http.request(
|
|
928
|
-
CatalystEndpoint.getUsersByProfileTag(name, cursor)
|
|
1016
|
+
async galleryTimeline(opts = {}) {
|
|
1017
|
+
const response = await this.http.request(
|
|
1018
|
+
CatalystEndpoint.galleryTimeline(opts)
|
|
929
1019
|
);
|
|
1020
|
+
return response.statuses;
|
|
930
1021
|
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
return this.http.request(CatalystEndpoint.randomStatus());
|
|
937
|
-
}
|
|
938
|
-
randomStatusByHashtag(q) {
|
|
939
|
-
return this.http.request(CatalystEndpoint.randomStatusByHashtag(q));
|
|
940
|
-
}
|
|
941
|
-
// bulk reactions
|
|
942
|
-
bulkStatusReactions(ids) {
|
|
943
|
-
return this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
1022
|
+
async homeTimelineV1() {
|
|
1023
|
+
const response = await this.http.request(
|
|
1024
|
+
CatalystEndpoint.homeTimelineV1()
|
|
1025
|
+
);
|
|
1026
|
+
return response.statuses;
|
|
944
1027
|
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1028
|
+
async searchTimeline(opts = {}) {
|
|
1029
|
+
const response = await this.http.request(
|
|
1030
|
+
CatalystEndpoint.searchTimeline(opts)
|
|
1031
|
+
);
|
|
1032
|
+
return response.statuses;
|
|
948
1033
|
}
|
|
949
|
-
|
|
950
|
-
|
|
1034
|
+
async userTimeline(username, opts = {}) {
|
|
1035
|
+
const response = await this.http.request(
|
|
1036
|
+
CatalystEndpoint.userTimeline(username, opts)
|
|
1037
|
+
);
|
|
1038
|
+
return response.statuses;
|
|
951
1039
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1040
|
+
async userGalleryTimeline(username, opts = {}) {
|
|
1041
|
+
const response = await this.http.request(
|
|
1042
|
+
CatalystEndpoint.userGalleryTimeline(username, opts)
|
|
1043
|
+
);
|
|
1044
|
+
return response.statuses;
|
|
955
1045
|
}
|
|
956
|
-
|
|
957
|
-
return this.http.request(CatalystEndpoint.
|
|
1046
|
+
firehoseTimeline(opts = {}) {
|
|
1047
|
+
return this.http.request(CatalystEndpoint.firehoseTimeline(opts));
|
|
958
1048
|
}
|
|
959
|
-
|
|
960
|
-
return this.http.request(CatalystEndpoint.
|
|
1049
|
+
homeTimeline(opts = {}) {
|
|
1050
|
+
return this.http.request(CatalystEndpoint.homeTimeline(opts));
|
|
961
1051
|
}
|
|
962
|
-
//
|
|
963
|
-
|
|
964
|
-
return this.http.request(CatalystEndpoint.
|
|
1052
|
+
// Trend
|
|
1053
|
+
trend() {
|
|
1054
|
+
return this.http.request(CatalystEndpoint.trend());
|
|
965
1055
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
return this.http.request(CatalystEndpoint.listSmartAlbumsByUser(username));
|
|
1056
|
+
richTrend() {
|
|
1057
|
+
return this.http.request(CatalystEndpoint.richTrend());
|
|
969
1058
|
}
|
|
970
1059
|
};
|
|
971
1060
|
|
|
@@ -1010,14 +1099,145 @@ var EgeriaClient = class {
|
|
|
1010
1099
|
}
|
|
1011
1100
|
};
|
|
1012
1101
|
|
|
1102
|
+
// src/endpoints/epicleseEndpoint.ts
|
|
1103
|
+
var EpicleseEndpoint = {
|
|
1104
|
+
getAuthors(q, platform) {
|
|
1105
|
+
const params = {};
|
|
1106
|
+
if (q != null) params["q"] = q;
|
|
1107
|
+
if (platform != null) params["platform"] = platform;
|
|
1108
|
+
return {
|
|
1109
|
+
path: "/epiclese/v1/authors",
|
|
1110
|
+
method: "GET",
|
|
1111
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1112
|
+
};
|
|
1113
|
+
},
|
|
1114
|
+
createAuthor(data) {
|
|
1115
|
+
return { path: "/epiclese/v1/authors", method: "POST", body: data };
|
|
1116
|
+
},
|
|
1117
|
+
getPlatforms() {
|
|
1118
|
+
return { path: "/epiclese/v1/platforms", method: "GET" };
|
|
1119
|
+
},
|
|
1120
|
+
getPlatform(id) {
|
|
1121
|
+
return { path: `/epiclese/v1/platforms/${id}`, method: "GET" };
|
|
1122
|
+
},
|
|
1123
|
+
getStatusMetadata(statusId) {
|
|
1124
|
+
return { path: `/epiclese/v1/tag/by/status/${statusId}`, method: "GET" };
|
|
1125
|
+
},
|
|
1126
|
+
createStatusMetadata(statusId, data) {
|
|
1127
|
+
return {
|
|
1128
|
+
path: `/epiclese/v1/tag/by/status/${statusId}`,
|
|
1129
|
+
method: "POST",
|
|
1130
|
+
body: data
|
|
1131
|
+
};
|
|
1132
|
+
},
|
|
1133
|
+
getWorlds(q, platform, offset) {
|
|
1134
|
+
const params = {};
|
|
1135
|
+
if (q != null) params["q"] = q;
|
|
1136
|
+
if (platform != null) params["platform"] = platform;
|
|
1137
|
+
if (offset != null) params["offset"] = String(offset);
|
|
1138
|
+
return {
|
|
1139
|
+
path: "/epiclese/v1/worlds",
|
|
1140
|
+
method: "GET",
|
|
1141
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1142
|
+
};
|
|
1143
|
+
},
|
|
1144
|
+
createWorld(data) {
|
|
1145
|
+
return { path: "/epiclese/v1/worlds", method: "POST", body: data };
|
|
1146
|
+
},
|
|
1147
|
+
resolveWorld(platform, name) {
|
|
1148
|
+
return {
|
|
1149
|
+
path: "/epiclese/v1/worlds/resolve",
|
|
1150
|
+
method: "GET",
|
|
1151
|
+
queryParameters: { platform, name }
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
// src/clients/epicleseClient.ts
|
|
1157
|
+
var EpicleseClient = class {
|
|
1158
|
+
constructor(http) {
|
|
1159
|
+
this.http = http;
|
|
1160
|
+
}
|
|
1161
|
+
getAuthors(q, platform) {
|
|
1162
|
+
return this.http.request(EpicleseEndpoint.getAuthors(q, platform));
|
|
1163
|
+
}
|
|
1164
|
+
async createAuthor(data) {
|
|
1165
|
+
const response = await this.http.request(
|
|
1166
|
+
EpicleseEndpoint.createAuthor(data)
|
|
1167
|
+
);
|
|
1168
|
+
return response.author;
|
|
1169
|
+
}
|
|
1170
|
+
async getPlatforms() {
|
|
1171
|
+
const response = await this.http.request(
|
|
1172
|
+
EpicleseEndpoint.getPlatforms()
|
|
1173
|
+
);
|
|
1174
|
+
return response.platforms;
|
|
1175
|
+
}
|
|
1176
|
+
async getPlatform(id) {
|
|
1177
|
+
const response = await this.http.request(
|
|
1178
|
+
EpicleseEndpoint.getPlatform(id)
|
|
1179
|
+
);
|
|
1180
|
+
return response.platform;
|
|
1181
|
+
}
|
|
1182
|
+
getStatusMetadata(statusId) {
|
|
1183
|
+
return this.http.request(EpicleseEndpoint.getStatusMetadata(statusId));
|
|
1184
|
+
}
|
|
1185
|
+
createStatusMetadata(statusId, tags) {
|
|
1186
|
+
return this.http.request(
|
|
1187
|
+
EpicleseEndpoint.createStatusMetadata(statusId, tags)
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
async getWorlds(q, platform, offset) {
|
|
1191
|
+
const response = await this.http.request(
|
|
1192
|
+
EpicleseEndpoint.getWorlds(q, platform, offset)
|
|
1193
|
+
);
|
|
1194
|
+
return response.items;
|
|
1195
|
+
}
|
|
1196
|
+
async createWorld(data) {
|
|
1197
|
+
const response = await this.http.request(
|
|
1198
|
+
EpicleseEndpoint.createWorld(data)
|
|
1199
|
+
);
|
|
1200
|
+
return response.world;
|
|
1201
|
+
}
|
|
1202
|
+
async resolveWorld(platform, name) {
|
|
1203
|
+
const response = await this.http.request(
|
|
1204
|
+
EpicleseEndpoint.resolveWorld(platform, name)
|
|
1205
|
+
);
|
|
1206
|
+
return response.world;
|
|
1207
|
+
}
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
// src/endpoints/featureFlagsEndpoint.ts
|
|
1211
|
+
var FeatureFlagsEndpoint = {
|
|
1212
|
+
me() {
|
|
1213
|
+
return { path: "/feature-flags/v1/me", method: "GET" };
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1217
|
+
// src/clients/featureFlagsClient.ts
|
|
1218
|
+
var FeatureFlagsClient = class {
|
|
1219
|
+
constructor(http) {
|
|
1220
|
+
this.http = http;
|
|
1221
|
+
}
|
|
1222
|
+
/** Gets the feature flags enabled for the current user. */
|
|
1223
|
+
async me() {
|
|
1224
|
+
const response = await this.http.request(
|
|
1225
|
+
FeatureFlagsEndpoint.me()
|
|
1226
|
+
);
|
|
1227
|
+
return response.flags;
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
|
|
1013
1231
|
// src/endpoints/mediaEndpoint.ts
|
|
1014
1232
|
var MediaEndpoint = {
|
|
1015
|
-
|
|
1016
|
-
|
|
1233
|
+
/** Gets a signed URL for uploading media (v1). */
|
|
1234
|
+
uploadV1() {
|
|
1235
|
+
return { path: "/media/v1/upload", method: "POST" };
|
|
1017
1236
|
},
|
|
1018
1237
|
delete(data) {
|
|
1019
1238
|
return { path: "/media/v1/upload", method: "DELETE", body: data };
|
|
1020
1239
|
},
|
|
1240
|
+
/** Gets a signed URL for uploading media (v2). */
|
|
1021
1241
|
upload() {
|
|
1022
1242
|
return { path: "/media/v2/upload", method: "POST" };
|
|
1023
1243
|
}
|
|
@@ -1028,12 +1248,15 @@ var MediaClient = class {
|
|
|
1028
1248
|
constructor(http) {
|
|
1029
1249
|
this.http = http;
|
|
1030
1250
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1251
|
+
/** Gets a signed URL for uploading media (v1). */
|
|
1252
|
+
uploadV1() {
|
|
1253
|
+
return this.http.request(MediaEndpoint.uploadV1());
|
|
1033
1254
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1255
|
+
/** Deletes media by URL. */
|
|
1256
|
+
delete(url) {
|
|
1257
|
+
return this.http.request(MediaEndpoint.delete({ url }));
|
|
1036
1258
|
}
|
|
1259
|
+
/** Gets a signed URL for uploading media (v2). */
|
|
1037
1260
|
upload() {
|
|
1038
1261
|
return this.http.request(MediaEndpoint.upload());
|
|
1039
1262
|
}
|
|
@@ -1042,10 +1265,15 @@ var MediaClient = class {
|
|
|
1042
1265
|
// src/endpoints/steambirdEndpoint.ts
|
|
1043
1266
|
var SteambirdEndpoint = {
|
|
1044
1267
|
notifications(issuer, opts = {}) {
|
|
1045
|
-
const params = {
|
|
1268
|
+
const params = {};
|
|
1269
|
+
if (issuer != null) params["issuer"] = issuer;
|
|
1046
1270
|
if (opts.since != null) params["since"] = opts.since;
|
|
1047
1271
|
if (opts.until != null) params["until"] = opts.until;
|
|
1048
|
-
return {
|
|
1272
|
+
return {
|
|
1273
|
+
path: "/steambird/v1/notifications",
|
|
1274
|
+
method: "GET",
|
|
1275
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1276
|
+
};
|
|
1049
1277
|
},
|
|
1050
1278
|
read(id) {
|
|
1051
1279
|
return { path: `/steambird/v1/notifications/${id}`, method: "POST" };
|
|
@@ -1057,11 +1285,14 @@ var SteambirdEndpoint = {
|
|
|
1057
1285
|
queryParameters: issuer != null ? { issuer } : void 0
|
|
1058
1286
|
};
|
|
1059
1287
|
},
|
|
1060
|
-
unreads(issuers = []) {
|
|
1288
|
+
unreads(issuer, issuers = []) {
|
|
1289
|
+
const params = {};
|
|
1290
|
+
if (issuer != null) params["issuer"] = issuer;
|
|
1291
|
+
if (issuers.length > 0) params["issuers"] = issuers.join(",");
|
|
1061
1292
|
return {
|
|
1062
1293
|
path: "/steambird/v1/notifications/unread",
|
|
1063
1294
|
method: "GET",
|
|
1064
|
-
queryParameters:
|
|
1295
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1065
1296
|
};
|
|
1066
1297
|
}
|
|
1067
1298
|
};
|
|
@@ -1077,17 +1308,21 @@ var SteambirdClient = class {
|
|
|
1077
1308
|
ISSUER_CATALYST_SYSTEM_MESSAGE = ISSUER_CATALYST_SYSTEM_MESSAGE;
|
|
1078
1309
|
ISSUER_CATALYST_USER_MESSAGE = ISSUER_CATALYST_USER_MESSAGE;
|
|
1079
1310
|
ISSUER_EGERIA_SYSTEM_MESSAGE = ISSUER_EGERIA_SYSTEM_MESSAGE;
|
|
1080
|
-
notifications
|
|
1081
|
-
|
|
1311
|
+
/** Gets notifications for a specific issuer, or all issuers if omitted. */
|
|
1312
|
+
async notifications(issuer, opts = {}) {
|
|
1313
|
+
const response = await this.http.request(
|
|
1314
|
+
SteambirdEndpoint.notifications(issuer, opts)
|
|
1315
|
+
);
|
|
1316
|
+
return response.notifications;
|
|
1082
1317
|
}
|
|
1083
1318
|
read(id) {
|
|
1084
|
-
return this.http.
|
|
1319
|
+
return this.http.request(SteambirdEndpoint.read(id));
|
|
1085
1320
|
}
|
|
1086
1321
|
readAll(issuer) {
|
|
1087
|
-
return this.http.
|
|
1322
|
+
return this.http.request(SteambirdEndpoint.readAll(issuer));
|
|
1088
1323
|
}
|
|
1089
|
-
unreads(issuers = []) {
|
|
1090
|
-
return this.http.request(SteambirdEndpoint.unreads(issuers));
|
|
1324
|
+
unreads(issuer, issuers = []) {
|
|
1325
|
+
return this.http.request(SteambirdEndpoint.unreads(issuer, issuers));
|
|
1091
1326
|
}
|
|
1092
1327
|
};
|
|
1093
1328
|
|
|
@@ -1215,7 +1450,10 @@ var OAuth = class {
|
|
|
1215
1450
|
return {
|
|
1216
1451
|
accessToken: json["access_token"],
|
|
1217
1452
|
refreshToken: json["refresh_token"],
|
|
1218
|
-
tokenType: json["token_type"]
|
|
1453
|
+
tokenType: json["token_type"],
|
|
1454
|
+
scope: json["scope"],
|
|
1455
|
+
expiresAt: json["expires_at"],
|
|
1456
|
+
expiresIn: json["expires_in"]
|
|
1219
1457
|
};
|
|
1220
1458
|
}
|
|
1221
1459
|
};
|
|
@@ -1271,6 +1509,12 @@ var CatalystTS = class {
|
|
|
1271
1509
|
get steambird() {
|
|
1272
1510
|
return new SteambirdClient(this.http);
|
|
1273
1511
|
}
|
|
1512
|
+
get epiclese() {
|
|
1513
|
+
return new EpicleseClient(this.http);
|
|
1514
|
+
}
|
|
1515
|
+
get featureFlags() {
|
|
1516
|
+
return new FeatureFlagsClient(this.http);
|
|
1517
|
+
}
|
|
1274
1518
|
};
|
|
1275
1519
|
|
|
1276
1520
|
// src/interceptors/loggingInterceptor.ts
|
|
@@ -1323,6 +1567,10 @@ export {
|
|
|
1323
1567
|
CatalystTS,
|
|
1324
1568
|
EgeriaClient,
|
|
1325
1569
|
EgeriaEndpoint,
|
|
1570
|
+
EpicleseClient,
|
|
1571
|
+
EpicleseEndpoint,
|
|
1572
|
+
FeatureFlagsClient,
|
|
1573
|
+
FeatureFlagsEndpoint,
|
|
1326
1574
|
HttpClient,
|
|
1327
1575
|
ISSUER_CATALYST_SYSTEM_MESSAGE,
|
|
1328
1576
|
ISSUER_CATALYST_USER_MESSAGE,
|