-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy pathapiTools.js
More file actions
262 lines (259 loc) · 9.61 KB
/
apiTools.js
File metadata and controls
262 lines (259 loc) · 9.61 KB
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
/**
* API Tools for drpy-node
* Provides documentation and information about the available API endpoints.
*/
export const get_drpy_api_list = async () => {
const apiList = [
{
category: "Core Video Source API",
endpoints: [
{
path: "/api/:module",
method: "GET/POST",
description: "Main interface for video sources. Supports listing categories, details, searching, and playing.",
params: {
"module": { "type": "path", "required": true, "description": "Engine name. Available: 'drpyS', 'hipy', 'php', 'xbpq', 'catvod'" },
"ac": { "type": "query", "required": false, "description": "Action type. 't'=Categories/List, 'ids'=Detail, 'action'=Custom Action. If omitted with 'wd', performs search." },
"t": { "type": "query", "required": false, "description": "Category ID (tid) when ac=t" },
"pg": { "type": "query", "required": false, "description": "Page number (default: 1)" },
"wd": { "type": "query", "required": false, "description": "Search keyword" },
"ids": { "type": "query", "required": false, "description": "Comma-separated VOD IDs when ac=ids" },
"play": { "type": "query", "required": false, "description": "URL to resolve for playback" },
"flag": { "type": "query", "required": false, "description": "Playlist flag (for play action)" },
"filter": { "type": "query", "required": false, "description": "Filter conditions (boolean/string)" },
"extend": { "type": "query", "required": false, "description": "Extended info (JSON string)" }
}
},
{
path: "/proxy/:module/:url",
method: "GET",
description: "Proxy wrapper for source requests (headers, etc.)",
params: {
"module": "Engine name",
"url": "Target URL (may need encoding)"
}
},
{
path: "/parse/:jx",
method: "GET",
description: "Video parsing interface",
params: {
"jx": "Parser name or alias",
"url": "Video URL to parse"
}
}
]
},
{
category: "Configuration",
endpoints: [
{
path: "/config",
method: "GET",
description: "Get the generated JSON configuration for apps (TVBox, etc.)",
params: {}
},
{
path: "/config/:id",
method: "GET",
description: "Get specific configuration variant"
}
]
},
{
category: "System & Tools",
endpoints: [
{
path: "/",
method: "GET",
description: "Home page / README"
},
{
path: "/health",
method: "GET",
description: "Server health check"
},
{
path: "/encoder",
method: "POST",
description: "Encode text/url",
params: { "text": "Content to encode", "mode": "Encoding mode" }
},
{
path: "/decoder",
method: "POST",
description: "Decode text/url",
params: { "text": "Content to decode" }
},
{
path: "/authcoder",
method: "GET",
description: "Generate random strings",
params: { "len": "Length", "number": "Count" }
},
{
path: "/http",
method: "POST",
description: "HTTP Proxy Request",
params: { "url": "Target URL", "method": "GET/POST", "headers": "Headers object", "data": "Body data" }
},
{
path: "/ai",
method: "GET",
description: "Simple AI Chat interface",
params: { "text": "User input" }
},
{
path: "/req/*",
method: "ALL",
description: "Request forwarder (if enabled)"
},
{
path: "/gh/release",
method: "GET",
description: "Get latest GitHub release for drpy-node"
},
{
path: "/cat/index.html",
method: "GET",
description: "Cat interface page"
}
]
},
{
category: "Admin & Management",
endpoints: [
{
path: "/admin/encoder",
method: "GET",
description: "Encoder tool UI"
},
{
path: "/admin/cookie-set",
method: "POST",
description: "Set system cookies",
params: { "cookie_auth_code": "Auth code", "key": "Cookie key", "value": "Cookie value" }
},
{
path: "/admin/download",
method: "GET",
description: "Download page for project archives"
}
]
},
{
category: "Task Management",
endpoints: [
{
path: "/execute-now/:taskName?",
method: "GET",
description: "Execute a cron task immediately"
},
{
path: "/tasks",
method: "GET",
description: "List all scheduled tasks"
},
{
path: "/tasks/:taskName",
method: "GET",
description: "Get details of a specific task"
}
]
},
{
category: "File & Image Services",
endpoints: [
{
path: "/image/upload",
method: "POST",
description: "Upload image (base64)",
params: { "imageId": "Unique ID", "base64Data": "Base64 content" }
},
{
path: "/image/:imageId",
method: "GET",
description: "Get image content"
},
{
path: "/image/list",
method: "GET",
description: "List stored images"
},
{
path: "/clipboard/add",
method: "POST",
description: "Add content to clipboard",
params: { "text": "Content", "mode": "append/overwrite" }
},
{
path: "/clipboard/read",
method: "GET",
description: "Read clipboard content"
},
{
path: "/source-checker/reports/save",
method: "POST",
description: "Save source check report"
},
{
path: "/source-checker/reports/latest",
method: "GET",
description: "Get latest source check report"
}
]
},
{
category: "Proxy Services",
endpoints: [
{
path: "/unified-proxy/proxy",
method: "GET/HEAD",
description: "Unified Smart Proxy (auto detects m3u8/file)",
params: { "url": "Target URL", "type": "force type (optional)" }
},
{
path: "/m3u8-proxy/playlist",
method: "GET",
description: "M3U8 Playlist Proxy"
},
{
path: "/mediaProxy",
method: "ALL",
description: "General Media Proxy"
},
{
path: "/file-proxy/proxy",
method: "GET/HEAD",
description: "Remote File Proxy"
},
{
path: "/webdav/file",
method: "GET",
description: "WebDAV File Proxy"
},
{
path: "/ftp/file",
method: "GET/HEAD",
description: "FTP File Proxy"
}
]
},
{
category: "Realtime",
endpoints: [
{
path: "/ws",
method: "GET",
description: "WebSocket connection for logs and status"
}
]
}
];
return {
content: [{
type: "text",
text: JSON.stringify(apiList, null, 2)
}]
};
};