This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
asyncapi.yml
322 lines (304 loc) · 9.16 KB
/
asyncapi.yml
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
asyncapi: 2.4.0
info:
title: YouCube
version: 0.0.0-poc.1.0.0
description: |
Documentation for YouCube's backend API.
All public servers are set by default in the client. \
The client will choose the best automatically.
license:
name: GLP-3.0
url: "https://github.com/Commandcracker/YouCube/blob/main/LICENSE.txt"
contact:
name: Github
url: https://github.com/Commandcracker/YouCube
servers:
primary:
url: wss://yc.tweaked-programs.cc
protocol: wss
description: |
**Primary Server**
Hosted on [hetzner](https://www.hetzner.com) in [Germany](https://duckduckgo.com/?t=ffab&q=Germany&ia=web&iaxm=about&iax=images) by [Sammy](https://github.com/1Turtle)
This server is very stable, this is, why it is the primary server.
sleepy:
url: wss://youcube.knijn.one
protocol: wss
description: |
**Sleepy Server**
Hosted on [nodespace](https://www.nodespace.net/) in [North Carolina](https://duckduckgo.com/?t=ffab&q=North+Carolina&ia=web&iax=about&iaxm=maps) by [EmmaKnijn](https://knijn.one/)
This server is sometimes sleeping.
fallback:
url: wss://youcube.onrender.com
protocol: wss
description: |
**Fallback Server**
Hosted on [render](https://render.com/) in [Oregon (US West)](https://duckduckgo.com/?t=ffab&q=Oregon+(US+West)&ia=web&iaxm=about&iax=images) by [Commandcracker](https://github.com/Commandcracker)
This server is only meant to be used when all other servers are offline. \
It's pretty slow, but it should do the job.
defaultContentType: application/json
channels:
/:
subscribe:
description: "Messages the Server Can Process"
message:
oneOf:
- $ref: "#/components/messages/request_media"
- $ref: "#/components/messages/get_chunk"
- $ref: "#/components/messages/get_vid"
- $ref: "#/components/messages/do_handshake"
publish:
description: "Messages the Server Can Return"
message:
oneOf:
- $ref: "#/components/messages/error"
- $ref: "#/components/messages/chunk"
- $ref: "#/components/messages/media"
- $ref: "#/components/messages/handshake"
- $ref: "#/components/messages/vid"
components:
messages:
request_media:
payload:
type: object
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "request_media"
url:
type: string
description: Url or Search Term
examples:
- "Never Gonna Give You Up"
- "dQw4w9WgXcQ"
width:
type: integer
maximum: 164
description: Video width
height:
type: integer
maximum: 120
description: Video height
required:
- action
- url
get_chunk:
payload:
type: object
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "get_chunk"
chunkindex:
type: integer
minimum: 0
description: Index of the next chunk
id:
type: string
pattern: ^[a-zA-Z0-9-_]*$
description: Media id
example: "dQw4w9WgXcQ"
required:
- action
- chunkindex
- id
get_vid:
payload:
type: object
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "get_vid"
tracker:
type: integer
minimum: 0
description: Location of the next frame
width:
type: integer
maximum: 164
description: Video width
height:
type: integer
maximum: 120
description: Video height
id:
type: string
pattern: ^[a-zA-Z0-9-_]*$
description: Media id
example: "dQw4w9WgXcQ"
required:
- action
- tracker
- id
- width
- height
error:
payload:
type: object
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "error"
message:
type: string
description: The error message
example: "You dare not use special Characters"
required:
- action
- message
do_handshake:
payload:
type: object
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "handshake"
required:
- action
chunk:
payload:
type: object
description: base64 encoded chunks (1 chunk is 16 bits)
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "chunk"
chunk:
type: string
description: The chunk
example: "aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kUXc0dzlXZ1hjUQ=="
required:
- action
- chunk
vid:
payload:
type: object
description: base64 encoded chunks (1 chunk is 16 bits)
additionalProperties: false
properties:
action:
type: string
description: The action that should be performed
enum:
- "vid"
lines:
type: array
items:
type: string
description: Video formats that the server supports
example:
- "32Vid 1.1"
- "24"
- "!CPC006CAAAAADMAEwAAAAAAAAAAACD/IP8g/yDMAP8A/wD/AMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=7550035d"
- "!CPC006CAAAAADMAEwAAAAAAAAAAACD/IP8g/yDMAP8A/wD/AMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=7550035d"
- "!CPC0070AAAAADMAEwAAAAAAAAAAACD/IP8g/yDMAP8A8hABAP8A2AAAAAABAAAAAAABAAAAAAEBAQAAAAEBAQAAAAEBAQAAAAEBAQAAAAAAAAAAAAAAAA==daa086f0"
- "..."
required:
- action
- lines
media:
payload:
type: object
additionalProperties: true
properties:
action:
type: string
description: The action that should be performed
enum:
- "media"
id:
type: string
pattern: ^[a-zA-Z0-9-_]*$
description: The media id
example: "dQw4w9WgXcQ"
title:
type: string
description: The title of the media
example: "Never Gonna Give You Up"
like_count:
type: integer
description: The like count of the media
example: 15526549
minimum: 0
view_count:
type: integer
description: The view count of the media
example: 1307201506
minimum: 0
playlist_videos:
type: array
description: The view count of the media
items:
type: string
additionalProperties: true
pattern: ^[a-zA-Z0-9-_]*$
description: The media id
example:
- "CVsbTCdTyAM"
- "xm3YgoEiEDc"
required:
- action
- id
handshake:
payload:
type: object
additionalProperties: true
properties:
action:
type: string
description: The action that should be performed
enum:
- "handshake"
server:
type: object
properties:
version:
type: string
description: The version the server is running
examples:
- "0.0.0-poc.0.0.1"
- "0.0.0-poc.0.0.0"
api:
type: object
properties:
version:
type: string
description: The api version the server is using
examples:
- "0.0.0-poc.0.0.0"
capabilities:
type: object
properties:
video:
type: array
items:
type: string
description: Video formats that the server supports
example:
- "32vid"
audio:
type: array
items:
type: string
description: Audio formats that the server supports
example:
- "dfpwm"
required:
- action