uapi-browser-sdk 0.1.2 → 0.1.4
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/README.md +55 -55
- package/dist/index.d.ts +4 -0
- package/dist/index.js +392 -156
- package/internal/.openapi-generator/FILES +563 -563
- package/package.json +11 -13
- package/src/index.ts +751 -582
package/dist/index.js
CHANGED
|
@@ -68,24 +68,31 @@ class ClipzyZaiXianJianTieBanApi {
|
|
|
68
68
|
}
|
|
69
69
|
async getClipzyGet(args = {}) {
|
|
70
70
|
const params = {};
|
|
71
|
+
const body = {};
|
|
71
72
|
if (args["id"] !== undefined)
|
|
72
73
|
params["id"] = args["id"];
|
|
73
|
-
let path = '/api/get';
|
|
74
|
-
return this.c._request('GET', path, params);
|
|
74
|
+
let path = '/api/v1/api/get';
|
|
75
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
75
76
|
}
|
|
76
77
|
async getClipzyRaw(args = {}) {
|
|
77
78
|
const params = {};
|
|
79
|
+
const body = {};
|
|
78
80
|
if (args["key"] !== undefined)
|
|
79
81
|
params["key"] = args["key"];
|
|
80
|
-
let path = '/api/raw/{id}';
|
|
82
|
+
let path = '/api/v1/api/raw/{id}';
|
|
81
83
|
if (args['id'] !== undefined)
|
|
82
84
|
path = path.replace('{' + 'id' + '}', String(args['id']));
|
|
83
|
-
return this.c._request('GET', path, params);
|
|
85
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
84
86
|
}
|
|
85
87
|
async postClipzyStore(args = {}) {
|
|
86
88
|
const params = {};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
const body = {};
|
|
90
|
+
if (args["compressedData"] !== undefined)
|
|
91
|
+
body["compressedData"] = args["compressedData"];
|
|
92
|
+
if (args["ttl"] !== undefined)
|
|
93
|
+
body["ttl"] = args["ttl"];
|
|
94
|
+
let path = '/api/v1/api/store';
|
|
95
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
89
96
|
}
|
|
90
97
|
}
|
|
91
98
|
class ConvertApi {
|
|
@@ -94,15 +101,19 @@ class ConvertApi {
|
|
|
94
101
|
}
|
|
95
102
|
async getConvertUnixtime(args = {}) {
|
|
96
103
|
const params = {};
|
|
104
|
+
const body = {};
|
|
97
105
|
if (args["time"] !== undefined)
|
|
98
106
|
params["time"] = args["time"];
|
|
99
|
-
let path = '/convert/unixtime';
|
|
100
|
-
return this.c._request('GET', path, params);
|
|
107
|
+
let path = '/api/v1/convert/unixtime';
|
|
108
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
101
109
|
}
|
|
102
110
|
async postConvertJson(args = {}) {
|
|
103
111
|
const params = {};
|
|
104
|
-
|
|
105
|
-
|
|
112
|
+
const body = {};
|
|
113
|
+
if (args["content"] !== undefined)
|
|
114
|
+
body["content"] = args["content"];
|
|
115
|
+
let path = '/api/v1/convert/json';
|
|
116
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
106
117
|
}
|
|
107
118
|
}
|
|
108
119
|
class DailyApi {
|
|
@@ -111,8 +122,9 @@ class DailyApi {
|
|
|
111
122
|
}
|
|
112
123
|
async getDailyNewsImage(args = {}) {
|
|
113
124
|
const params = {};
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
const body = {};
|
|
126
|
+
let path = '/api/v1/daily/news-image';
|
|
127
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
116
128
|
}
|
|
117
129
|
}
|
|
118
130
|
class GameApi {
|
|
@@ -121,32 +133,39 @@ class GameApi {
|
|
|
121
133
|
}
|
|
122
134
|
async getGameEpicFree(args = {}) {
|
|
123
135
|
const params = {};
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
const body = {};
|
|
137
|
+
let path = '/api/v1/game/epic-free';
|
|
138
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
126
139
|
}
|
|
127
140
|
async getGameMinecraftHistoryid(args = {}) {
|
|
128
141
|
const params = {};
|
|
142
|
+
const body = {};
|
|
143
|
+
if (args["name"] !== undefined)
|
|
144
|
+
params["name"] = args["name"];
|
|
129
145
|
if (args["uuid"] !== undefined)
|
|
130
146
|
params["uuid"] = args["uuid"];
|
|
131
|
-
let path = '/game/minecraft/historyid';
|
|
132
|
-
return this.c._request('GET', path, params);
|
|
147
|
+
let path = '/api/v1/game/minecraft/historyid';
|
|
148
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
133
149
|
}
|
|
134
150
|
async getGameMinecraftServerstatus(args = {}) {
|
|
135
151
|
const params = {};
|
|
152
|
+
const body = {};
|
|
136
153
|
if (args["server"] !== undefined)
|
|
137
154
|
params["server"] = args["server"];
|
|
138
|
-
let path = '/game/minecraft/serverstatus';
|
|
139
|
-
return this.c._request('GET', path, params);
|
|
155
|
+
let path = '/api/v1/game/minecraft/serverstatus';
|
|
156
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
140
157
|
}
|
|
141
158
|
async getGameMinecraftUserinfo(args = {}) {
|
|
142
159
|
const params = {};
|
|
160
|
+
const body = {};
|
|
143
161
|
if (args["username"] !== undefined)
|
|
144
162
|
params["username"] = args["username"];
|
|
145
|
-
let path = '/game/minecraft/userinfo';
|
|
146
|
-
return this.c._request('GET', path, params);
|
|
163
|
+
let path = '/api/v1/game/minecraft/userinfo';
|
|
164
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
147
165
|
}
|
|
148
166
|
async getGameSteamSummary(args = {}) {
|
|
149
167
|
const params = {};
|
|
168
|
+
const body = {};
|
|
150
169
|
if (args["steamid"] !== undefined)
|
|
151
170
|
params["steamid"] = args["steamid"];
|
|
152
171
|
if (args["id"] !== undefined)
|
|
@@ -155,8 +174,8 @@ class GameApi {
|
|
|
155
174
|
params["id3"] = args["id3"];
|
|
156
175
|
if (args["key"] !== undefined)
|
|
157
176
|
params["key"] = args["key"];
|
|
158
|
-
let path = '/game/steam/summary';
|
|
159
|
-
return this.c._request('GET', path, params);
|
|
177
|
+
let path = '/api/v1/game/steam/summary';
|
|
178
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
160
179
|
}
|
|
161
180
|
}
|
|
162
181
|
class ImageApi {
|
|
@@ -165,6 +184,7 @@ class ImageApi {
|
|
|
165
184
|
}
|
|
166
185
|
async getAvatarGravatar(args = {}) {
|
|
167
186
|
const params = {};
|
|
187
|
+
const body = {};
|
|
168
188
|
if (args["email"] !== undefined)
|
|
169
189
|
params["email"] = args["email"];
|
|
170
190
|
if (args["hash"] !== undefined)
|
|
@@ -175,67 +195,90 @@ class ImageApi {
|
|
|
175
195
|
params["d"] = args["d"];
|
|
176
196
|
if (args["r"] !== undefined)
|
|
177
197
|
params["r"] = args["r"];
|
|
178
|
-
let path = '/avatar/gravatar';
|
|
179
|
-
return this.c._request('GET', path, params);
|
|
198
|
+
let path = '/api/v1/avatar/gravatar';
|
|
199
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
180
200
|
}
|
|
181
201
|
async getImageBingDaily(args = {}) {
|
|
182
202
|
const params = {};
|
|
183
|
-
|
|
184
|
-
|
|
203
|
+
const body = {};
|
|
204
|
+
let path = '/api/v1/image/bing-daily';
|
|
205
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
185
206
|
}
|
|
186
207
|
async getImageMotou(args = {}) {
|
|
187
208
|
const params = {};
|
|
209
|
+
const body = {};
|
|
188
210
|
if (args["qq"] !== undefined)
|
|
189
211
|
params["qq"] = args["qq"];
|
|
190
212
|
if (args["bg_color"] !== undefined)
|
|
191
213
|
params["bg_color"] = args["bg_color"];
|
|
192
|
-
let path = '/image/motou';
|
|
193
|
-
return this.c._request('GET', path, params);
|
|
214
|
+
let path = '/api/v1/image/motou';
|
|
215
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
194
216
|
}
|
|
195
217
|
async getImageQrcode(args = {}) {
|
|
196
218
|
const params = {};
|
|
219
|
+
const body = {};
|
|
197
220
|
if (args["text"] !== undefined)
|
|
198
221
|
params["text"] = args["text"];
|
|
199
222
|
if (args["size"] !== undefined)
|
|
200
223
|
params["size"] = args["size"];
|
|
201
224
|
if (args["format"] !== undefined)
|
|
202
225
|
params["format"] = args["format"];
|
|
203
|
-
let path = '/image/qrcode';
|
|
204
|
-
return this.c._request('GET', path, params);
|
|
226
|
+
let path = '/api/v1/image/qrcode';
|
|
227
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
205
228
|
}
|
|
206
229
|
async getImageTobase64(args = {}) {
|
|
207
230
|
const params = {};
|
|
231
|
+
const body = {};
|
|
208
232
|
if (args["url"] !== undefined)
|
|
209
233
|
params["url"] = args["url"];
|
|
210
|
-
let path = '/image/tobase64';
|
|
211
|
-
return this.c._request('GET', path, params);
|
|
234
|
+
let path = '/api/v1/image/tobase64';
|
|
235
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
212
236
|
}
|
|
213
237
|
async postImageCompress(args = {}) {
|
|
214
238
|
const params = {};
|
|
239
|
+
const body = {};
|
|
215
240
|
if (args["level"] !== undefined)
|
|
216
241
|
params["level"] = args["level"];
|
|
217
242
|
if (args["format"] !== undefined)
|
|
218
243
|
params["format"] = args["format"];
|
|
219
|
-
|
|
220
|
-
|
|
244
|
+
if (args["file"] !== undefined)
|
|
245
|
+
body["file"] = args["file"];
|
|
246
|
+
let path = '/api/v1/image/compress';
|
|
247
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
221
248
|
}
|
|
222
249
|
async postImageFrombase64(args = {}) {
|
|
223
250
|
const params = {};
|
|
224
|
-
|
|
225
|
-
|
|
251
|
+
const body = {};
|
|
252
|
+
if (args["imageData"] !== undefined)
|
|
253
|
+
body["imageData"] = args["imageData"];
|
|
254
|
+
let path = '/api/v1/image/frombase64';
|
|
255
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
226
256
|
}
|
|
227
257
|
async postImageMotou(args = {}) {
|
|
228
258
|
const params = {};
|
|
229
|
-
|
|
230
|
-
|
|
259
|
+
const body = {};
|
|
260
|
+
if (args["bg_color"] !== undefined)
|
|
261
|
+
body["bg_color"] = args["bg_color"];
|
|
262
|
+
if (args["file"] !== undefined)
|
|
263
|
+
body["file"] = args["file"];
|
|
264
|
+
if (args["image_url"] !== undefined)
|
|
265
|
+
body["image_url"] = args["image_url"];
|
|
266
|
+
let path = '/api/v1/image/motou';
|
|
267
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
231
268
|
}
|
|
232
269
|
async postImageSpeechless(args = {}) {
|
|
233
270
|
const params = {};
|
|
234
|
-
|
|
235
|
-
|
|
271
|
+
const body = {};
|
|
272
|
+
if (args["bottom_text"] !== undefined)
|
|
273
|
+
body["bottom_text"] = args["bottom_text"];
|
|
274
|
+
if (args["top_text"] !== undefined)
|
|
275
|
+
body["top_text"] = args["top_text"];
|
|
276
|
+
let path = '/api/v1/image/speechless';
|
|
277
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
236
278
|
}
|
|
237
279
|
async postImageSvg(args = {}) {
|
|
238
280
|
const params = {};
|
|
281
|
+
const body = {};
|
|
239
282
|
if (args["format"] !== undefined)
|
|
240
283
|
params["format"] = args["format"];
|
|
241
284
|
if (args["width"] !== undefined)
|
|
@@ -244,8 +287,10 @@ class ImageApi {
|
|
|
244
287
|
params["height"] = args["height"];
|
|
245
288
|
if (args["quality"] !== undefined)
|
|
246
289
|
params["quality"] = args["quality"];
|
|
247
|
-
|
|
248
|
-
|
|
290
|
+
if (args["file"] !== undefined)
|
|
291
|
+
body["file"] = args["file"];
|
|
292
|
+
let path = '/api/v1/image/svg';
|
|
293
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
249
294
|
}
|
|
250
295
|
}
|
|
251
296
|
class MiscApi {
|
|
@@ -254,34 +299,39 @@ class MiscApi {
|
|
|
254
299
|
}
|
|
255
300
|
async getHistoryProgrammer(args = {}) {
|
|
256
301
|
const params = {};
|
|
302
|
+
const body = {};
|
|
257
303
|
if (args["month"] !== undefined)
|
|
258
304
|
params["month"] = args["month"];
|
|
259
305
|
if (args["day"] !== undefined)
|
|
260
306
|
params["day"] = args["day"];
|
|
261
|
-
let path = '/history/programmer';
|
|
262
|
-
return this.c._request('GET', path, params);
|
|
307
|
+
let path = '/api/v1/history/programmer';
|
|
308
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
263
309
|
}
|
|
264
310
|
async getHistoryProgrammerToday(args = {}) {
|
|
265
311
|
const params = {};
|
|
266
|
-
|
|
267
|
-
|
|
312
|
+
const body = {};
|
|
313
|
+
let path = '/api/v1/history/programmer/today';
|
|
314
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
268
315
|
}
|
|
269
316
|
async getMiscHotboard(args = {}) {
|
|
270
317
|
const params = {};
|
|
318
|
+
const body = {};
|
|
271
319
|
if (args["type"] !== undefined)
|
|
272
320
|
params["type"] = args["type"];
|
|
273
|
-
let path = '/misc/hotboard';
|
|
274
|
-
return this.c._request('GET', path, params);
|
|
321
|
+
let path = '/api/v1/misc/hotboard';
|
|
322
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
275
323
|
}
|
|
276
324
|
async getMiscPhoneinfo(args = {}) {
|
|
277
325
|
const params = {};
|
|
326
|
+
const body = {};
|
|
278
327
|
if (args["phone"] !== undefined)
|
|
279
328
|
params["phone"] = args["phone"];
|
|
280
|
-
let path = '/misc/phoneinfo';
|
|
281
|
-
return this.c._request('GET', path, params);
|
|
329
|
+
let path = '/api/v1/misc/phoneinfo';
|
|
330
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
282
331
|
}
|
|
283
332
|
async getMiscRandomnumber(args = {}) {
|
|
284
333
|
const params = {};
|
|
334
|
+
const body = {};
|
|
285
335
|
if (args["min"] !== undefined)
|
|
286
336
|
params["min"] = args["min"];
|
|
287
337
|
if (args["max"] !== undefined)
|
|
@@ -294,52 +344,76 @@ class MiscApi {
|
|
|
294
344
|
params["allow_decimal"] = args["allow_decimal"];
|
|
295
345
|
if (args["decimal_places"] !== undefined)
|
|
296
346
|
params["decimal_places"] = args["decimal_places"];
|
|
297
|
-
let path = '/misc/randomnumber';
|
|
298
|
-
return this.c._request('GET', path, params);
|
|
347
|
+
let path = '/api/v1/misc/randomnumber';
|
|
348
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
299
349
|
}
|
|
300
350
|
async getMiscTimestamp(args = {}) {
|
|
301
351
|
const params = {};
|
|
352
|
+
const body = {};
|
|
302
353
|
if (args["ts"] !== undefined)
|
|
303
354
|
params["ts"] = args["ts"];
|
|
304
|
-
let path = '/misc/timestamp';
|
|
305
|
-
return this.c._request('GET', path, params);
|
|
355
|
+
let path = '/api/v1/misc/timestamp';
|
|
356
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
306
357
|
}
|
|
307
358
|
async getMiscTrackingCarriers(args = {}) {
|
|
308
359
|
const params = {};
|
|
309
|
-
|
|
310
|
-
|
|
360
|
+
const body = {};
|
|
361
|
+
let path = '/api/v1/misc/tracking/carriers';
|
|
362
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
311
363
|
}
|
|
312
364
|
async getMiscTrackingDetect(args = {}) {
|
|
313
365
|
const params = {};
|
|
366
|
+
const body = {};
|
|
314
367
|
if (args["tracking_number"] !== undefined)
|
|
315
368
|
params["tracking_number"] = args["tracking_number"];
|
|
316
|
-
let path = '/misc/tracking/detect';
|
|
317
|
-
return this.c._request('GET', path, params);
|
|
369
|
+
let path = '/api/v1/misc/tracking/detect';
|
|
370
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
318
371
|
}
|
|
319
372
|
async getMiscTrackingQuery(args = {}) {
|
|
320
373
|
const params = {};
|
|
374
|
+
const body = {};
|
|
321
375
|
if (args["tracking_number"] !== undefined)
|
|
322
376
|
params["tracking_number"] = args["tracking_number"];
|
|
323
377
|
if (args["carrier_code"] !== undefined)
|
|
324
378
|
params["carrier_code"] = args["carrier_code"];
|
|
325
|
-
let path = '/misc/tracking/query';
|
|
326
|
-
return this.c._request('GET', path, params);
|
|
379
|
+
let path = '/api/v1/misc/tracking/query';
|
|
380
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
327
381
|
}
|
|
328
382
|
async getMiscWeather(args = {}) {
|
|
329
383
|
const params = {};
|
|
384
|
+
const body = {};
|
|
330
385
|
if (args["city"] !== undefined)
|
|
331
386
|
params["city"] = args["city"];
|
|
332
387
|
if (args["adcode"] !== undefined)
|
|
333
388
|
params["adcode"] = args["adcode"];
|
|
334
|
-
|
|
335
|
-
|
|
389
|
+
if (args["extended"] !== undefined)
|
|
390
|
+
params["extended"] = args["extended"];
|
|
391
|
+
if (args["indices"] !== undefined)
|
|
392
|
+
params["indices"] = args["indices"];
|
|
393
|
+
if (args["forecast"] !== undefined)
|
|
394
|
+
params["forecast"] = args["forecast"];
|
|
395
|
+
let path = '/api/v1/misc/weather';
|
|
396
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
336
397
|
}
|
|
337
398
|
async getMiscWorldtime(args = {}) {
|
|
338
399
|
const params = {};
|
|
400
|
+
const body = {};
|
|
339
401
|
if (args["city"] !== undefined)
|
|
340
402
|
params["city"] = args["city"];
|
|
341
|
-
let path = '/misc/worldtime';
|
|
342
|
-
return this.c._request('GET', path, params);
|
|
403
|
+
let path = '/api/v1/misc/worldtime';
|
|
404
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
405
|
+
}
|
|
406
|
+
async postMiscDateDiff(args = {}) {
|
|
407
|
+
const params = {};
|
|
408
|
+
const body = {};
|
|
409
|
+
if (args["end_date"] !== undefined)
|
|
410
|
+
body["end_date"] = args["end_date"];
|
|
411
|
+
if (args["format"] !== undefined)
|
|
412
|
+
body["format"] = args["format"];
|
|
413
|
+
if (args["start_date"] !== undefined)
|
|
414
|
+
body["start_date"] = args["start_date"];
|
|
415
|
+
let path = '/api/v1/misc/date-diff';
|
|
416
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
343
417
|
}
|
|
344
418
|
}
|
|
345
419
|
class NetworkApi {
|
|
@@ -348,81 +422,91 @@ class NetworkApi {
|
|
|
348
422
|
}
|
|
349
423
|
async getNetworkDns(args = {}) {
|
|
350
424
|
const params = {};
|
|
425
|
+
const body = {};
|
|
351
426
|
if (args["domain"] !== undefined)
|
|
352
427
|
params["domain"] = args["domain"];
|
|
353
428
|
if (args["type"] !== undefined)
|
|
354
429
|
params["type"] = args["type"];
|
|
355
|
-
let path = '/network/dns';
|
|
356
|
-
return this.c._request('GET', path, params);
|
|
430
|
+
let path = '/api/v1/network/dns';
|
|
431
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
357
432
|
}
|
|
358
433
|
async getNetworkIcp(args = {}) {
|
|
359
434
|
const params = {};
|
|
435
|
+
const body = {};
|
|
360
436
|
if (args["domain"] !== undefined)
|
|
361
437
|
params["domain"] = args["domain"];
|
|
362
|
-
let path = '/network/icp';
|
|
363
|
-
return this.c._request('GET', path, params);
|
|
438
|
+
let path = '/api/v1/network/icp';
|
|
439
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
364
440
|
}
|
|
365
441
|
async getNetworkIpinfo(args = {}) {
|
|
366
442
|
const params = {};
|
|
443
|
+
const body = {};
|
|
367
444
|
if (args["ip"] !== undefined)
|
|
368
445
|
params["ip"] = args["ip"];
|
|
369
446
|
if (args["source"] !== undefined)
|
|
370
447
|
params["source"] = args["source"];
|
|
371
|
-
let path = '/network/ipinfo';
|
|
372
|
-
return this.c._request('GET', path, params);
|
|
448
|
+
let path = '/api/v1/network/ipinfo';
|
|
449
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
373
450
|
}
|
|
374
451
|
async getNetworkMyip(args = {}) {
|
|
375
452
|
const params = {};
|
|
453
|
+
const body = {};
|
|
376
454
|
if (args["source"] !== undefined)
|
|
377
455
|
params["source"] = args["source"];
|
|
378
|
-
let path = '/network/myip';
|
|
379
|
-
return this.c._request('GET', path, params);
|
|
456
|
+
let path = '/api/v1/network/myip';
|
|
457
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
380
458
|
}
|
|
381
459
|
async getNetworkPing(args = {}) {
|
|
382
460
|
const params = {};
|
|
461
|
+
const body = {};
|
|
383
462
|
if (args["host"] !== undefined)
|
|
384
463
|
params["host"] = args["host"];
|
|
385
|
-
let path = '/network/ping';
|
|
386
|
-
return this.c._request('GET', path, params);
|
|
464
|
+
let path = '/api/v1/network/ping';
|
|
465
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
387
466
|
}
|
|
388
467
|
async getNetworkPingmyip(args = {}) {
|
|
389
468
|
const params = {};
|
|
390
|
-
|
|
391
|
-
|
|
469
|
+
const body = {};
|
|
470
|
+
let path = '/api/v1/network/pingmyip';
|
|
471
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
392
472
|
}
|
|
393
473
|
async getNetworkPortscan(args = {}) {
|
|
394
474
|
const params = {};
|
|
475
|
+
const body = {};
|
|
395
476
|
if (args["host"] !== undefined)
|
|
396
477
|
params["host"] = args["host"];
|
|
397
478
|
if (args["port"] !== undefined)
|
|
398
479
|
params["port"] = args["port"];
|
|
399
480
|
if (args["protocol"] !== undefined)
|
|
400
481
|
params["protocol"] = args["protocol"];
|
|
401
|
-
let path = '/network/portscan';
|
|
402
|
-
return this.c._request('GET', path, params);
|
|
482
|
+
let path = '/api/v1/network/portscan';
|
|
483
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
403
484
|
}
|
|
404
485
|
async getNetworkUrlstatus(args = {}) {
|
|
405
486
|
const params = {};
|
|
487
|
+
const body = {};
|
|
406
488
|
if (args["url"] !== undefined)
|
|
407
489
|
params["url"] = args["url"];
|
|
408
|
-
let path = '/network/urlstatus';
|
|
409
|
-
return this.c._request('GET', path, params);
|
|
490
|
+
let path = '/api/v1/network/urlstatus';
|
|
491
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
410
492
|
}
|
|
411
493
|
async getNetworkWhois(args = {}) {
|
|
412
494
|
const params = {};
|
|
495
|
+
const body = {};
|
|
413
496
|
if (args["domain"] !== undefined)
|
|
414
497
|
params["domain"] = args["domain"];
|
|
415
498
|
if (args["format"] !== undefined)
|
|
416
499
|
params["format"] = args["format"];
|
|
417
|
-
let path = '/network/whois';
|
|
418
|
-
return this.c._request('GET', path, params);
|
|
500
|
+
let path = '/api/v1/network/whois';
|
|
501
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
419
502
|
}
|
|
420
503
|
async getNetworkWxdomain(args = {}) {
|
|
421
504
|
const params = {};
|
|
505
|
+
const body = {};
|
|
422
506
|
if (args["domain"] !== undefined)
|
|
423
507
|
params["domain"] = args["domain"];
|
|
424
|
-
let path = '/network/wxdomain';
|
|
425
|
-
return this.c._request('GET', path, params);
|
|
508
|
+
let path = '/api/v1/network/wxdomain';
|
|
509
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
426
510
|
}
|
|
427
511
|
}
|
|
428
512
|
class PoemApi {
|
|
@@ -431,8 +515,9 @@ class PoemApi {
|
|
|
431
515
|
}
|
|
432
516
|
async getSaying(args = {}) {
|
|
433
517
|
const params = {};
|
|
434
|
-
|
|
435
|
-
|
|
518
|
+
const body = {};
|
|
519
|
+
let path = '/api/v1/saying';
|
|
520
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
436
521
|
}
|
|
437
522
|
}
|
|
438
523
|
class RandomApi {
|
|
@@ -441,33 +526,39 @@ class RandomApi {
|
|
|
441
526
|
}
|
|
442
527
|
async getAnswerbookAsk(args = {}) {
|
|
443
528
|
const params = {};
|
|
529
|
+
const body = {};
|
|
444
530
|
if (args["question"] !== undefined)
|
|
445
531
|
params["question"] = args["question"];
|
|
446
|
-
let path = '/answerbook/ask';
|
|
447
|
-
return this.c._request('GET', path, params);
|
|
532
|
+
let path = '/api/v1/answerbook/ask';
|
|
533
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
448
534
|
}
|
|
449
535
|
async getRandomImage(args = {}) {
|
|
450
536
|
const params = {};
|
|
537
|
+
const body = {};
|
|
451
538
|
if (args["category"] !== undefined)
|
|
452
539
|
params["category"] = args["category"];
|
|
453
540
|
if (args["type"] !== undefined)
|
|
454
541
|
params["type"] = args["type"];
|
|
455
|
-
let path = '/random/image';
|
|
456
|
-
return this.c._request('GET', path, params);
|
|
542
|
+
let path = '/api/v1/random/image';
|
|
543
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
457
544
|
}
|
|
458
545
|
async getRandomString(args = {}) {
|
|
459
546
|
const params = {};
|
|
547
|
+
const body = {};
|
|
460
548
|
if (args["length"] !== undefined)
|
|
461
549
|
params["length"] = args["length"];
|
|
462
550
|
if (args["type"] !== undefined)
|
|
463
551
|
params["type"] = args["type"];
|
|
464
|
-
let path = '/random/string';
|
|
465
|
-
return this.c._request('GET', path, params);
|
|
552
|
+
let path = '/api/v1/random/string';
|
|
553
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
466
554
|
}
|
|
467
555
|
async postAnswerbookAsk(args = {}) {
|
|
468
556
|
const params = {};
|
|
469
|
-
|
|
470
|
-
|
|
557
|
+
const body = {};
|
|
558
|
+
if (args["question"] !== undefined)
|
|
559
|
+
body["question"] = args["question"];
|
|
560
|
+
let path = '/api/v1/answerbook/ask';
|
|
561
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
471
562
|
}
|
|
472
563
|
}
|
|
473
564
|
class SocialApi {
|
|
@@ -476,13 +567,15 @@ class SocialApi {
|
|
|
476
567
|
}
|
|
477
568
|
async getGithubRepo(args = {}) {
|
|
478
569
|
const params = {};
|
|
570
|
+
const body = {};
|
|
479
571
|
if (args["repo"] !== undefined)
|
|
480
572
|
params["repo"] = args["repo"];
|
|
481
|
-
let path = '/github/repo';
|
|
482
|
-
return this.c._request('GET', path, params);
|
|
573
|
+
let path = '/api/v1/github/repo';
|
|
574
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
483
575
|
}
|
|
484
576
|
async getSocialBilibiliArchives(args = {}) {
|
|
485
577
|
const params = {};
|
|
578
|
+
const body = {};
|
|
486
579
|
if (args["mid"] !== undefined)
|
|
487
580
|
params["mid"] = args["mid"];
|
|
488
581
|
if (args["keywords"] !== undefined)
|
|
@@ -493,20 +586,22 @@ class SocialApi {
|
|
|
493
586
|
params["ps"] = args["ps"];
|
|
494
587
|
if (args["pn"] !== undefined)
|
|
495
588
|
params["pn"] = args["pn"];
|
|
496
|
-
let path = '/social/bilibili/archives';
|
|
497
|
-
return this.c._request('GET', path, params);
|
|
589
|
+
let path = '/api/v1/social/bilibili/archives';
|
|
590
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
498
591
|
}
|
|
499
592
|
async getSocialBilibiliLiveroom(args = {}) {
|
|
500
593
|
const params = {};
|
|
594
|
+
const body = {};
|
|
501
595
|
if (args["mid"] !== undefined)
|
|
502
596
|
params["mid"] = args["mid"];
|
|
503
597
|
if (args["room_id"] !== undefined)
|
|
504
598
|
params["room_id"] = args["room_id"];
|
|
505
|
-
let path = '/social/bilibili/liveroom';
|
|
506
|
-
return this.c._request('GET', path, params);
|
|
599
|
+
let path = '/api/v1/social/bilibili/liveroom';
|
|
600
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
507
601
|
}
|
|
508
602
|
async getSocialBilibiliReplies(args = {}) {
|
|
509
603
|
const params = {};
|
|
604
|
+
const body = {};
|
|
510
605
|
if (args["oid"] !== undefined)
|
|
511
606
|
params["oid"] = args["oid"];
|
|
512
607
|
if (args["sort"] !== undefined)
|
|
@@ -515,38 +610,42 @@ class SocialApi {
|
|
|
515
610
|
params["ps"] = args["ps"];
|
|
516
611
|
if (args["pn"] !== undefined)
|
|
517
612
|
params["pn"] = args["pn"];
|
|
518
|
-
let path = '/social/bilibili/replies';
|
|
519
|
-
return this.c._request('GET', path, params);
|
|
613
|
+
let path = '/api/v1/social/bilibili/replies';
|
|
614
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
520
615
|
}
|
|
521
616
|
async getSocialBilibiliUserinfo(args = {}) {
|
|
522
617
|
const params = {};
|
|
618
|
+
const body = {};
|
|
523
619
|
if (args["uid"] !== undefined)
|
|
524
620
|
params["uid"] = args["uid"];
|
|
525
|
-
let path = '/social/bilibili/userinfo';
|
|
526
|
-
return this.c._request('GET', path, params);
|
|
621
|
+
let path = '/api/v1/social/bilibili/userinfo';
|
|
622
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
527
623
|
}
|
|
528
624
|
async getSocialBilibiliVideoinfo(args = {}) {
|
|
529
625
|
const params = {};
|
|
626
|
+
const body = {};
|
|
530
627
|
if (args["aid"] !== undefined)
|
|
531
628
|
params["aid"] = args["aid"];
|
|
532
629
|
if (args["bvid"] !== undefined)
|
|
533
630
|
params["bvid"] = args["bvid"];
|
|
534
|
-
let path = '/social/bilibili/videoinfo';
|
|
535
|
-
return this.c._request('GET', path, params);
|
|
631
|
+
let path = '/api/v1/social/bilibili/videoinfo';
|
|
632
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
536
633
|
}
|
|
537
634
|
async getSocialQqGroupinfo(args = {}) {
|
|
538
635
|
const params = {};
|
|
636
|
+
const body = {};
|
|
539
637
|
if (args["group_id"] !== undefined)
|
|
540
638
|
params["group_id"] = args["group_id"];
|
|
541
|
-
let path = '/social/qq/groupinfo';
|
|
542
|
-
return this.c._request('GET', path, params);
|
|
639
|
+
let path = '/api/v1/social/qq/groupinfo';
|
|
640
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
543
641
|
}
|
|
544
642
|
async getSocialQqUserinfo(args = {}) {
|
|
545
643
|
const params = {};
|
|
644
|
+
const body = {};
|
|
546
645
|
if (args["qq"] !== undefined)
|
|
547
646
|
params["qq"] = args["qq"];
|
|
548
|
-
let path = '/social/qq/userinfo';
|
|
549
|
-
return this.c._request('GET', path, params);
|
|
647
|
+
let path = '/api/v1/social/qq/userinfo';
|
|
648
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
550
649
|
}
|
|
551
650
|
}
|
|
552
651
|
class StatusApi {
|
|
@@ -555,15 +654,17 @@ class StatusApi {
|
|
|
555
654
|
}
|
|
556
655
|
async getStatusRatelimit(args = {}) {
|
|
557
656
|
const params = {};
|
|
558
|
-
|
|
559
|
-
|
|
657
|
+
const body = {};
|
|
658
|
+
let path = '/api/v1/status/ratelimit';
|
|
659
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
560
660
|
}
|
|
561
661
|
async getStatusUsage(args = {}) {
|
|
562
662
|
const params = {};
|
|
663
|
+
const body = {};
|
|
563
664
|
if (args["path"] !== undefined)
|
|
564
665
|
params["path"] = args["path"];
|
|
565
|
-
let path = '/status/usage';
|
|
566
|
-
return this.c._request('GET', path, params);
|
|
666
|
+
let path = '/api/v1/status/usage';
|
|
667
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
567
668
|
}
|
|
568
669
|
}
|
|
569
670
|
class TextApi {
|
|
@@ -572,45 +673,123 @@ class TextApi {
|
|
|
572
673
|
}
|
|
573
674
|
async getTextMd5(args = {}) {
|
|
574
675
|
const params = {};
|
|
676
|
+
const body = {};
|
|
575
677
|
if (args["text"] !== undefined)
|
|
576
678
|
params["text"] = args["text"];
|
|
577
|
-
let path = '/text/md5';
|
|
578
|
-
return this.c._request('GET', path, params);
|
|
679
|
+
let path = '/api/v1/text/md5';
|
|
680
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
579
681
|
}
|
|
580
682
|
async postTextAesDecrypt(args = {}) {
|
|
581
683
|
const params = {};
|
|
582
|
-
|
|
583
|
-
|
|
684
|
+
const body = {};
|
|
685
|
+
if (args["key"] !== undefined)
|
|
686
|
+
body["key"] = args["key"];
|
|
687
|
+
if (args["nonce"] !== undefined)
|
|
688
|
+
body["nonce"] = args["nonce"];
|
|
689
|
+
if (args["text"] !== undefined)
|
|
690
|
+
body["text"] = args["text"];
|
|
691
|
+
let path = '/api/v1/text/aes/decrypt';
|
|
692
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
693
|
+
}
|
|
694
|
+
async postTextAesDecryptAdvanced(args = {}) {
|
|
695
|
+
const params = {};
|
|
696
|
+
const body = {};
|
|
697
|
+
if (args["iv"] !== undefined)
|
|
698
|
+
body["iv"] = args["iv"];
|
|
699
|
+
if (args["key"] !== undefined)
|
|
700
|
+
body["key"] = args["key"];
|
|
701
|
+
if (args["mode"] !== undefined)
|
|
702
|
+
body["mode"] = args["mode"];
|
|
703
|
+
if (args["padding"] !== undefined)
|
|
704
|
+
body["padding"] = args["padding"];
|
|
705
|
+
if (args["text"] !== undefined)
|
|
706
|
+
body["text"] = args["text"];
|
|
707
|
+
let path = '/api/v1/text/aes/decrypt-advanced';
|
|
708
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
584
709
|
}
|
|
585
710
|
async postTextAesEncrypt(args = {}) {
|
|
586
711
|
const params = {};
|
|
587
|
-
|
|
588
|
-
|
|
712
|
+
const body = {};
|
|
713
|
+
if (args["key"] !== undefined)
|
|
714
|
+
body["key"] = args["key"];
|
|
715
|
+
if (args["text"] !== undefined)
|
|
716
|
+
body["text"] = args["text"];
|
|
717
|
+
let path = '/api/v1/text/aes/encrypt';
|
|
718
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
719
|
+
}
|
|
720
|
+
async postTextAesEncryptAdvanced(args = {}) {
|
|
721
|
+
const params = {};
|
|
722
|
+
const body = {};
|
|
723
|
+
if (args["iv"] !== undefined)
|
|
724
|
+
body["iv"] = args["iv"];
|
|
725
|
+
if (args["key"] !== undefined)
|
|
726
|
+
body["key"] = args["key"];
|
|
727
|
+
if (args["mode"] !== undefined)
|
|
728
|
+
body["mode"] = args["mode"];
|
|
729
|
+
if (args["output_format"] !== undefined)
|
|
730
|
+
body["output_format"] = args["output_format"];
|
|
731
|
+
if (args["padding"] !== undefined)
|
|
732
|
+
body["padding"] = args["padding"];
|
|
733
|
+
if (args["text"] !== undefined)
|
|
734
|
+
body["text"] = args["text"];
|
|
735
|
+
let path = '/api/v1/text/aes/encrypt-advanced';
|
|
736
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
589
737
|
}
|
|
590
738
|
async postTextAnalyze(args = {}) {
|
|
591
739
|
const params = {};
|
|
592
|
-
|
|
593
|
-
|
|
740
|
+
const body = {};
|
|
741
|
+
if (args["text"] !== undefined)
|
|
742
|
+
body["text"] = args["text"];
|
|
743
|
+
let path = '/api/v1/text/analyze';
|
|
744
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
594
745
|
}
|
|
595
746
|
async postTextBase64Decode(args = {}) {
|
|
596
747
|
const params = {};
|
|
597
|
-
|
|
598
|
-
|
|
748
|
+
const body = {};
|
|
749
|
+
if (args["text"] !== undefined)
|
|
750
|
+
body["text"] = args["text"];
|
|
751
|
+
let path = '/api/v1/text/base64/decode';
|
|
752
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
599
753
|
}
|
|
600
754
|
async postTextBase64Encode(args = {}) {
|
|
601
755
|
const params = {};
|
|
602
|
-
|
|
603
|
-
|
|
756
|
+
const body = {};
|
|
757
|
+
if (args["text"] !== undefined)
|
|
758
|
+
body["text"] = args["text"];
|
|
759
|
+
let path = '/api/v1/text/base64/encode';
|
|
760
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
761
|
+
}
|
|
762
|
+
async postTextConvert(args = {}) {
|
|
763
|
+
const params = {};
|
|
764
|
+
const body = {};
|
|
765
|
+
if (args["from"] !== undefined)
|
|
766
|
+
body["from"] = args["from"];
|
|
767
|
+
if (args["options"] !== undefined)
|
|
768
|
+
body["options"] = args["options"];
|
|
769
|
+
if (args["text"] !== undefined)
|
|
770
|
+
body["text"] = args["text"];
|
|
771
|
+
if (args["to"] !== undefined)
|
|
772
|
+
body["to"] = args["to"];
|
|
773
|
+
let path = '/api/v1/text/convert';
|
|
774
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
604
775
|
}
|
|
605
776
|
async postTextMd5(args = {}) {
|
|
606
777
|
const params = {};
|
|
607
|
-
|
|
608
|
-
|
|
778
|
+
const body = {};
|
|
779
|
+
if (args["text"] !== undefined)
|
|
780
|
+
body["text"] = args["text"];
|
|
781
|
+
let path = '/api/v1/text/md5';
|
|
782
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
609
783
|
}
|
|
610
784
|
async postTextMd5Verify(args = {}) {
|
|
611
785
|
const params = {};
|
|
612
|
-
|
|
613
|
-
|
|
786
|
+
const body = {};
|
|
787
|
+
if (args["hash"] !== undefined)
|
|
788
|
+
body["hash"] = args["hash"];
|
|
789
|
+
if (args["text"] !== undefined)
|
|
790
|
+
body["text"] = args["text"];
|
|
791
|
+
let path = '/api/v1/text/md5/verify';
|
|
792
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
614
793
|
}
|
|
615
794
|
}
|
|
616
795
|
class TranslateApi {
|
|
@@ -619,27 +798,57 @@ class TranslateApi {
|
|
|
619
798
|
}
|
|
620
799
|
async getAiTranslateLanguages(args = {}) {
|
|
621
800
|
const params = {};
|
|
622
|
-
|
|
623
|
-
|
|
801
|
+
const body = {};
|
|
802
|
+
let path = '/api/v1/ai/translate/languages';
|
|
803
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
624
804
|
}
|
|
625
805
|
async postAiTranslate(args = {}) {
|
|
626
806
|
const params = {};
|
|
807
|
+
const body = {};
|
|
627
808
|
if (args["target_lang"] !== undefined)
|
|
628
809
|
params["target_lang"] = args["target_lang"];
|
|
629
|
-
|
|
630
|
-
|
|
810
|
+
if (args["context"] !== undefined)
|
|
811
|
+
body["context"] = args["context"];
|
|
812
|
+
if (args["fast_mode"] !== undefined)
|
|
813
|
+
body["fast_mode"] = args["fast_mode"];
|
|
814
|
+
if (args["max_concurrency"] !== undefined)
|
|
815
|
+
body["max_concurrency"] = args["max_concurrency"];
|
|
816
|
+
if (args["preserve_format"] !== undefined)
|
|
817
|
+
body["preserve_format"] = args["preserve_format"];
|
|
818
|
+
if (args["source_lang"] !== undefined)
|
|
819
|
+
body["source_lang"] = args["source_lang"];
|
|
820
|
+
if (args["style"] !== undefined)
|
|
821
|
+
body["style"] = args["style"];
|
|
822
|
+
if (args["text"] !== undefined)
|
|
823
|
+
body["text"] = args["text"];
|
|
824
|
+
if (args["texts"] !== undefined)
|
|
825
|
+
body["texts"] = args["texts"];
|
|
826
|
+
let path = '/api/v1/ai/translate';
|
|
827
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
631
828
|
}
|
|
632
829
|
async postTranslateStream(args = {}) {
|
|
633
830
|
const params = {};
|
|
634
|
-
|
|
635
|
-
|
|
831
|
+
const body = {};
|
|
832
|
+
if (args["from_lang"] !== undefined)
|
|
833
|
+
body["from_lang"] = args["from_lang"];
|
|
834
|
+
if (args["query"] !== undefined)
|
|
835
|
+
body["query"] = args["query"];
|
|
836
|
+
if (args["to_lang"] !== undefined)
|
|
837
|
+
body["to_lang"] = args["to_lang"];
|
|
838
|
+
if (args["tone"] !== undefined)
|
|
839
|
+
body["tone"] = args["tone"];
|
|
840
|
+
let path = '/api/v1/translate/stream';
|
|
841
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
636
842
|
}
|
|
637
843
|
async postTranslateText(args = {}) {
|
|
638
844
|
const params = {};
|
|
845
|
+
const body = {};
|
|
639
846
|
if (args["to_lang"] !== undefined)
|
|
640
847
|
params["to_lang"] = args["to_lang"];
|
|
641
|
-
|
|
642
|
-
|
|
848
|
+
if (args["text"] !== undefined)
|
|
849
|
+
body["text"] = args["text"];
|
|
850
|
+
let path = '/api/v1/translate/text';
|
|
851
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
643
852
|
}
|
|
644
853
|
}
|
|
645
854
|
class WebparseApi {
|
|
@@ -648,31 +857,35 @@ class WebparseApi {
|
|
|
648
857
|
}
|
|
649
858
|
async getWebTomarkdownAsyncStatus(args = {}) {
|
|
650
859
|
const params = {};
|
|
651
|
-
|
|
860
|
+
const body = {};
|
|
861
|
+
let path = '/api/v1/web/tomarkdown/async/{task_id}';
|
|
652
862
|
if (args['task_id'] !== undefined)
|
|
653
863
|
path = path.replace('{' + 'task_id' + '}', String(args['task_id']));
|
|
654
|
-
return this.c._request('GET', path, params);
|
|
864
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
655
865
|
}
|
|
656
866
|
async getWebparseExtractimages(args = {}) {
|
|
657
867
|
const params = {};
|
|
868
|
+
const body = {};
|
|
658
869
|
if (args["url"] !== undefined)
|
|
659
870
|
params["url"] = args["url"];
|
|
660
|
-
let path = '/webparse/extractimages';
|
|
661
|
-
return this.c._request('GET', path, params);
|
|
871
|
+
let path = '/api/v1/webparse/extractimages';
|
|
872
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
662
873
|
}
|
|
663
874
|
async getWebparseMetadata(args = {}) {
|
|
664
875
|
const params = {};
|
|
876
|
+
const body = {};
|
|
665
877
|
if (args["url"] !== undefined)
|
|
666
878
|
params["url"] = args["url"];
|
|
667
|
-
let path = '/webparse/metadata';
|
|
668
|
-
return this.c._request('GET', path, params);
|
|
879
|
+
let path = '/api/v1/webparse/metadata';
|
|
880
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
669
881
|
}
|
|
670
882
|
async postWebTomarkdownAsync(args = {}) {
|
|
671
883
|
const params = {};
|
|
884
|
+
const body = {};
|
|
672
885
|
if (args["url"] !== undefined)
|
|
673
886
|
params["url"] = args["url"];
|
|
674
|
-
let path = '/web/tomarkdown/async';
|
|
675
|
-
return this.c._request('POST', path, params);
|
|
887
|
+
let path = '/api/v1/web/tomarkdown/async';
|
|
888
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
676
889
|
}
|
|
677
890
|
}
|
|
678
891
|
class MinGanCiShiBieApi {
|
|
@@ -681,20 +894,27 @@ class MinGanCiShiBieApi {
|
|
|
681
894
|
}
|
|
682
895
|
async getSensitiveWordAnalyzeQuery(args = {}) {
|
|
683
896
|
const params = {};
|
|
897
|
+
const body = {};
|
|
684
898
|
if (args["keyword"] !== undefined)
|
|
685
899
|
params["keyword"] = args["keyword"];
|
|
686
|
-
let path = '/sensitive-word/analyze-query';
|
|
687
|
-
return this.c._request('GET', path, params);
|
|
900
|
+
let path = '/api/v1/sensitive-word/analyze-query';
|
|
901
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
688
902
|
}
|
|
689
903
|
async postSensitiveWordAnalyze(args = {}) {
|
|
690
904
|
const params = {};
|
|
691
|
-
|
|
692
|
-
|
|
905
|
+
const body = {};
|
|
906
|
+
if (args["keywords"] !== undefined)
|
|
907
|
+
body["keywords"] = args["keywords"];
|
|
908
|
+
let path = '/api/v1/sensitive-word/analyze';
|
|
909
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
693
910
|
}
|
|
694
911
|
async postSensitiveWordQuickCheck(args = {}) {
|
|
695
912
|
const params = {};
|
|
696
|
-
|
|
697
|
-
|
|
913
|
+
const body = {};
|
|
914
|
+
if (args["text"] !== undefined)
|
|
915
|
+
body["text"] = args["text"];
|
|
916
|
+
let path = '/api/v1/text/profanitycheck';
|
|
917
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
698
918
|
}
|
|
699
919
|
}
|
|
700
920
|
class ZhiNengSouSuoApi {
|
|
@@ -703,12 +923,28 @@ class ZhiNengSouSuoApi {
|
|
|
703
923
|
}
|
|
704
924
|
async getSearchEngines(args = {}) {
|
|
705
925
|
const params = {};
|
|
706
|
-
|
|
707
|
-
|
|
926
|
+
const body = {};
|
|
927
|
+
let path = '/api/v1/search/engines';
|
|
928
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
708
929
|
}
|
|
709
930
|
async postSearchAggregate(args = {}) {
|
|
710
931
|
const params = {};
|
|
711
|
-
|
|
712
|
-
|
|
932
|
+
const body = {};
|
|
933
|
+
if (args["fetch_full"] !== undefined)
|
|
934
|
+
body["fetch_full"] = args["fetch_full"];
|
|
935
|
+
if (args["filetype"] !== undefined)
|
|
936
|
+
body["filetype"] = args["filetype"];
|
|
937
|
+
if (args["query"] !== undefined)
|
|
938
|
+
body["query"] = args["query"];
|
|
939
|
+
if (args["site"] !== undefined)
|
|
940
|
+
body["site"] = args["site"];
|
|
941
|
+
if (args["sort"] !== undefined)
|
|
942
|
+
body["sort"] = args["sort"];
|
|
943
|
+
if (args["time_range"] !== undefined)
|
|
944
|
+
body["time_range"] = args["time_range"];
|
|
945
|
+
if (args["timeout_ms"] !== undefined)
|
|
946
|
+
body["timeout_ms"] = args["timeout_ms"];
|
|
947
|
+
let path = '/api/v1/search/aggregate';
|
|
948
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
713
949
|
}
|
|
714
950
|
}
|