-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathswagger.yaml
949 lines (949 loc) · 27.4 KB
/
swagger.yaml
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
openapi: 3.0.0
servers:
- description: Official Instance
url: https://pipedapi.kavin.rocks
info:
description: This is an API specification for Piped API instances.
version: "1.0.0"
title: Piped API
contact:
email: [email protected]
url: https://github.com/TeamPiped/Piped/issues
license:
name: MIT
url: "https://opensource.org/licenses/MIT"
tags:
- name: video
description: Video related operations.
- name: channel
description: Channel related operations.
- name: playlist
description: Playlist related operations.
- name: search
description: Search related operations.
- name: feed
description: Feed related operations.
- name: unauthenticated
description: Requests that can be made by anyone, without any authentication.
- name: authenticated
description: Requests that can only be made when logged in, with an authToken.
paths:
/trending:
get:
tags:
- unauthenticated
summary: Gets all Trending Videos
operationId: trending
description: Gets all Trending Videos in the requested country.
parameters:
- in: query
name: region
description: The Region to get trending videos from.
required: true
example: US
schema:
$ref: "#/components/schemas/Regions"
responses:
"200":
description: Array of trending Videos.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/StreamItem"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/streams/{videoId}:
get:
tags:
- video
- unauthenticated
summary: Gets Video Information
operationId: streamInfo
description: |
Gets all available Stream information about a video.
parameters:
- in: path
name: videoId
description: The video ID of the YouTube video you want to get information about.
required: true
example: dQw4w9WgXcQ
schema:
type: string
pattern: ^([a-zA-Z0-9_-]{11})$
responses:
"200":
description: The information about the video.
content:
application/json:
schema:
$ref: "#/components/schemas/VideoInfo"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/channel/{channelId}:
get:
tags:
- channel
- unauthenticated
summary: Gets Channel Information from ID.
operationId: channelInfoId
description: |
Gets all available Channel information about a channel.
parameters:
- in: path
name: channelId
description: The channel ID of the YouTube channel you want to get information about.
required: true
example: UCs6KfncB4OV6Vug4o_bzijg
schema:
type: string
pattern: ^([a-zA-Z0-9_-]{24})$
responses:
"200":
description: The information about the channel.
content:
application/json:
schema:
$ref: "#/components/schemas/ChannelInfo"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/c/{name}:
get:
tags:
- channel
- unauthenticated
summary: Gets Channel Information from name.
operationId: channelInfoName
description: |
Gets all available Channel information about a channel.
parameters:
- in: path
name: name
description: The name of the YouTube channel you want to get information about.
required: true
example: Dream
schema:
type: string
responses:
"200":
description: The information about the channel.
content:
application/json:
schema:
$ref: "#/components/schemas/ChannelInfo"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/user/{username}:
get:
tags:
- channel
- unauthenticated
summary: Gets Channel Information from username.
operationId: channelInfoUsername
description: |
Gets all available Channel information about a channel.
parameters:
- in: path
name: username
description: The username of the YouTube channel you want to get information about.
required: true
example: DreamTraps
schema:
type: string
responses:
"200":
description: The information about the channel.
content:
application/json:
schema:
$ref: "#/components/schemas/ChannelInfo"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/nextpage/channel/{channelId}:
get:
tags:
- channel
- unauthenticated
summary: Gets more channel videos
operationId: channelNextPage
description: |
Gets more channel videos.
parameters:
- in: path
name: channelId
description: The channel ID of the YouTube channel you want to get more videos from.
required: true
example: UCs6KfncB4OV6Vug4o_bzijg
schema:
type: string
pattern: "^[a-zA-Z0-9_-]{24}$"
- in: query
name: nextpage
description: The next page token to get more videos from.
required: true
schema:
type: string
responses:
"200":
description: The information about the channel.
content:
application/json:
schema:
$ref: "#/components/schemas/StreamsPage"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/comments/{videoId}:
get:
tags:
- video
- unauthenticated
summary: Gets Comments
operationId: comments
description: |
Gets the comments for a video.
parameters:
- in: path
name: videoId
description: The video ID of the YouTube video you want to get comments from.
required: true
example: dQw4w9WgXcQ
schema:
type: string
pattern: ^([a-zA-Z0-9_-]{11})$
responses:
"200":
description: The first page of comments for the video.
content:
application/json:
schema:
$ref: "#/components/schemas/CommentsPage"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/nextpage/comments/{videoId}:
get:
tags:
- video
- unauthenticated
summary: Gets more comments
operationId: commentsNextPage
description: |
Gets more comments.
parameters:
- in: path
name: videoId
description: The video ID of the YouTube video you want to get more comments from.
required: true
example: dQw4w9WgXcQ
schema:
type: string
pattern: ^([a-zA-Z0-9_-]{11})$
- in: query
name: nextpage
description: The next page token to get more comments from.
required: true
schema:
type: string
responses:
"200":
description: The page of comments from the video.
content:
application/json:
schema:
$ref: "#/components/schemas/CommentsPage"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/search:
get:
tags:
- search
- unauthenticated
summary: Searches for videos, channels, and playlists.
operationId: search
description: |
Searches for videos, channels, and playlists.
parameters:
- in: query
name: q
description: The search query string.
required: true
example: "Techlore"
schema:
type: string
- in: query
name: filter
description: The filter parameter specifies a filter query that restricts the results to items that match the filter.
required: true
schema:
$ref: "#/components/schemas/SearchFilter"
responses:
"200":
description: The first page of search results.
content:
application/json:
schema:
$ref: "#/components/schemas/SearchPage"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/nextpage/search:
get:
tags:
- search
- unauthenticated
summary: Gets more search results
operationId: searchNextPage
description: |
Gets more search results.
parameters:
- in: query
name: nextpage
description: The next page token to get more search results from.
required: true
schema:
type: string
- in: query
name: q
description: The search query string.
required: true
example: "Techlore"
schema:
type: string
- in: query
name: filter
description: The filter parameter specifies a filter query that restricts the results to items that match the filter.
required: true
schema:
$ref: "#/components/schemas/SearchFilter"
responses:
"200":
description: The page of search results.
content:
application/json:
schema:
$ref: "#/components/schemas/SearchPage"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
/feed/unauthenticated:
get:
tags:
- feed
- unauthenticated
summary: Generate a feed while unauthenticated, from a list of channelIds.
operationId: feedUnauthenticated
description: |
Generates a user feed while unauthenticated.
parameters:
- in: query
name: channels
description: A list of channelIds to generate a feed from.
required: true
explode: false
schema:
type: array
items:
type: string
pattern: "^[a-zA-Z0-9_-]{24}$"
example:
- UCs6KfncB4OV6Vug4o_bzijg
- UClcE-kVhqyiHCcjYwcpfj9w
responses:
"200":
description: The video items from the feed.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/StreamItem"
"500":
description: Server Side exception
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionError"
components:
schemas:
Regions:
type: string
enum:
[
"DZ",
"AR",
"AU",
"AT",
"AZ",
"BH",
"BD",
"BY",
"BE",
"BO",
"BA",
"BR",
"BG",
"CA",
"CL",
"CO",
"CR",
"HR",
"CY",
"CZ",
"DK",
"DO",
"EC",
"EG",
"SV",
"EE",
"FI",
"FR",
"GE",
"DE",
"GH",
"GR",
"GT",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IQ",
"IE",
"IL",
"IT",
"JM",
"JP",
"JO",
"KZ",
"KE",
"KW",
"LV",
"LB",
"LY",
"LI",
"LT",
"LU",
"MY",
"MT",
"MX",
"ME",
"MA",
"NP",
"NL",
"NZ",
"NI",
"NG",
"MK",
"NO",
"OM",
"PK",
"PA",
"PG",
"PY",
"PE",
"PH",
"PL",
"PT",
"PR",
"QA",
"RO",
"RU",
"SA",
"SN",
"RS",
"SG",
"SK",
"SI",
"ZA",
"KR",
"ES",
"LK",
"SE",
"CH",
"TW",
"TZ",
"TH",
"TN",
"TR",
"UG",
"UA",
"AE",
"GB",
"US",
"UY",
"VE",
"VN",
"YE",
"ZW",
]
SearchFilter:
type: string
enum:
[
"all",
"videos",
"channels",
"playlists",
"music_songs",
"music_videos",
"music_albums",
"music_playlists",
"music_artists",
]
VideoInfo:
type: object
properties:
audioStreams:
type: array
items:
$ref: "#/components/schemas/Stream"
videoStreams:
type: array
items:
$ref: "#/components/schemas/Stream"
description:
type: string
description: The video's description.
dislikes:
type: integer
description: The number of dislikes the video has.
duration:
type: integer
description: The video's duration in seconds.
hls:
type: string
description: The stream of the video in a HLS manifest.
lbryId:
type: string
description: The LBRY ID of the video.
likes:
type: integer
description: The number of likes the video has.
livestream:
type: boolean
description: Whether the video is a livestream.
proxyUrl:
type: string
description: The base URL of the backend instance's proxy.
subtitles:
type: array
items:
$ref: "#/components/schemas/Subtitle"
dash:
type: string
description: The URL of the DASH manifest.
thumbnailUrl:
type: string
description: The URL of the video's thumbnail.
title:
type: string
description: The video's title.
uploadDate:
type: string
description: The date the video was uploaded.
uploader:
type: string
description: The video's uploader.
uploaderAvatar:
type: string
description: The URL of the video's uploader's avatar.
uploaderUrl:
type: string
description: The relative URL of the video's uploader.
uploaderVerified:
type: boolean
description: Whether the video's uploader is verified.
views:
type: integer
description: The number of views the video has.
relatedStreams:
type: array
items:
$ref: "#/components/schemas/StreamItem"
description: The related videos for the current video.
ChannelInfo:
type: object
properties:
avatarUrl:
type: string
description: The URL of the channel's avatar.
bannerUrl:
type: string
description: The URL of the channel's banner.
description:
type: string
description: The channel's description.
id:
type: string
description: The ID of the channel.
example: UCs6KfncB4OV6Vug4o_bzijg
name:
type: string
description: The name of the channel.
example: Techlore
nextpage:
type: string
description: The parameter used to get the next page of related videos.
relatedStreams:
type: array
items:
$ref: "#/components/schemas/StreamItem"
subscriberCount:
type: integer
description: The number of subscribers the channel has.
example: 170000
verified:
type: boolean
description: Whether the channel is verified.
example: true
Stream:
properties:
itag:
type: integer
description: The itag of the stream, or -1 if not available.
url:
type: string
description: The URL of the stream.
format:
type: string
description: The format of the stream.
enum: [MPEG_4, v3GPP, WEBM, M4A, WEBMA_OPUS]
example: MPEG_4
quality:
type: string
description: The quality of the stream.
example: 1080p
mimeType:
type: string
description: The mime type of the stream.
example: video/mp4
codec:
type: string
description: The codec of the stream.
example: avc1.64002a
videoOnly:
type: boolean
bitrate:
type: integer
initStart:
type: integer
initEnd:
type: integer
indexStart:
type: integer
indexEnd:
type: integer
width:
type: integer
height:
type: integer
fps:
type: integer
audioTrackId:
type: string
nullable: true
audioTrackName:
type: string
nullable: true
audioTrackType:
type: string
nullable: true
audioTrackLocale:
type: string
nullable: true
StreamItem:
type: object
required:
- duration
- thumbnail
- title
- url
properties:
type:
type: string
description: The type of the stream item. Always stream.
example: stream
duration:
type: integer
description: The duration of the video in seconds.
thumbnail:
type: string
description: The thumbnail of the video.
title:
type: string
description: The title of the video.
uploaded:
type: integer
format: int64
description: The date in unix epoch the video was uploaded.
uploadedDate:
type: string
example: 3 months ago
description: The relative date the video was uploaded on.
deprecated: true
nullable: true
uploaderAvatar:
type: string
description: The avatar of the channel of the video.
nullable: true
uploaderName:
type: string
description: The name of the channel of the video.
uploaderUrl:
type: string
description: The relative URL of the channel of the video.
uploaderVerified:
type: boolean
description: Whether or not the channel has a verified badge.
url:
type: string
description: The relative URL to the video.
views:
type: integer
description: The number of views the video has.
isShort:
type: boolean
description: Whether or not the video is a short video.
shortDescription:
type: string
description: The short description of the video.
nullable: true
contentLength:
type: integer
description: The content length of the video.
StreamsPage:
type: object
properties:
relatedStreams:
type: array
items:
$ref: "#/components/schemas/StreamItem"
nextpage:
type: string
nullable: true
description: The parameter used to get the next page of this page.
ExceptionError:
required:
- error
- message
properties:
error:
type: string
description: The stacktrace provided by the server.
message:
type: string
description: The error message from the stacktrace.
description: When a server-side exception takes place.
Subtitle:
type: object
properties:
autoGenerated:
type: boolean
description: Whether the subtitle is auto generated.
code:
type: string
description: The language code of the subtitle.
mimeType:
type: string
description: The mime type of the subtitle.
url:
type: string
description: The URL of the subtitle.
Comment:
type: object
properties:
author:
type: string
description: The name of the author of the comment.
thumbnail:
type: string
description: The thumbnail/avatar of the author of the comment.
commentId:
type: string
description: The ID of the comment.
commentText:
type: string
description: The text of the comment.
commentedTime:
type: string
example: 3 months ago
description: The relative time the comment was made.
commentorUrl:
type: string
description: The relative URL of the author of the comment.
example: "/channel/UCs6KfncB4OV6Vug4o_bzijg"
repliesPage:
type: string
description: The parameter used as the nextpage to fetch replies for this comment.
likeCount:
type: integer
description: The number of likes the comment has.
replyCount:
type: integer
description: The number of replies the comment has.
hearted:
type: boolean
description: Whether the comment was hearted by the video's uploader.
pinned:
type: boolean
description: Whether the comment was pinned by the video's uploader.
verified:
type: boolean
description: Whether the author of the comment is verified.
creatorReplied:
type: boolean
description: Whether the video's uploader replied to the comment.
channelOwner:
type: boolean
description: Whether the author of the comment is the video's uploader.
CommentsPage:
type: object
properties:
comments:
type: array
items:
$ref: "#/components/schemas/Comment"
nextpage:
type: string
nullable: true
description: The parameter used to get the next page of comments.
disabled:
type: boolean
description: Whether or not comments are disabled on the video.
ChannelItem:
type: object
properties:
type:
type: string
description: The type of the channel item. Always channel.
example: channel
description:
type: string
description: The description of the channel.
name:
type: string
description: The name of the channel.
subscribers:
type: integer
description: The number of subscribers the channel has.
thumbnail:
type: string
description: The thumbnail of the channel.
url:
type: string
description: The relative URL of the channel.
verified:
type: boolean
description: Whether the channel is verified.
videos:
type: integer
description: The number of videos the channel has.
PlaylistItem:
type: object
properties:
type:
type: string
description: The type of the playlist item. Always playlist.
example: playlist
name:
type: string
description: The name of the playlist.
thumbnail:
type: string
description: The thumbnail of the playlist.
url:
type: string
description: The relative URL of the playlist.
videos:
type: integer
description: The number of videos in the playlist.
SearchItem:
type: object
discriminator:
propertyName: type
mapping:
stream: "#/components/schemas/StreamItem"
channel: "#/components/schemas/ChannelItem"
playlist: "#/components/schemas/PlaylistItem"
oneOf:
- $ref: "#/components/schemas/StreamItem"
- $ref: "#/components/schemas/ChannelItem"
- $ref: "#/components/schemas/PlaylistItem"
SearchPage:
type: object
properties:
corrected:
type: boolean
description: Whether the search query was corrected.
items:
type: array
items:
$ref: "#/components/schemas/SearchItem"
example:
- description: "Join us in spreading privacy and security to the masses. Home of: 🕵️♀️ Go Incognito | A Guide To Security, Privacy, ..."
name: "Techlore"
subscribers: 192000
thumbnail: "https://pipedproxy.kavin.rocks/lwHqZYuTM3v0oBB_RevOFbD_cHL7AWUfYID_iv8trv6_4u4r7Go_t4qFJplYiJNQVC-14Tb8=s88-c-k-c0x00ffffff-no-rw-mo?host=yt3.ggpht.com"
url: "/channel/UCs6KfncB4OV6Vug4o_bzijg"
verified: true
videos: 320
- duration: 527
shortDescription: "Top 10 best tools to boost privacy and security today. Most times, you need to put in a lot of effort to gain privacy, security, and ..."
thumbnail: "https://pipedproxy.kavin.rocks/vi/LLpLU317zfc/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFbyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDZO4ZxHFoyHKmPQTZAVVVDTmB8FA&host=i.ytimg.com"
title: "Top 10 Tools To Boost Privacy & Security!"
uploaded: 1625590800000
uploadedDate: "1 year ago"
uploaderAvatar: "https://pipedproxy.kavin.rocks/lwHqZYuTM3v0oBB_RevOFbD_cHL7AWUfYID_iv8trv6_4u4r7Go_t4qFJplYiJNQVC-14Tb8=s68-c-k-c0x00ffffff-no-rw?host=yt3.ggpht.com"
uploaderName: "Techlore"
uploaderUrl: "/channel/UCs6KfncB4OV6Vug4o_bzijg"
uploaderVerified: true
url: "/watch?v=LLpLU317zfc"
views: 113599
nextpage:
type: string
nullable: true
description: The parameter used to get the next page of this page.
suggestion:
type: string
nullable: true
example: null
description: The suggested search query.