uapi-browser-sdk 0.1.12 → 0.1.13

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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/internal/src/apis/ClipzyApi.d.ts +0 -12
  3. package/dist/internal/src/apis/ClipzyApi.js +15 -36
  4. package/dist/internal/src/apis/ConvertApi.d.ts +0 -8
  5. package/dist/internal/src/apis/ConvertApi.js +10 -24
  6. package/dist/internal/src/apis/DailyApi.d.ts +0 -4
  7. package/dist/internal/src/apis/DailyApi.js +5 -12
  8. package/dist/internal/src/apis/DefaultApi.d.ts +0 -20
  9. package/dist/internal/src/apis/DefaultApi.js +25 -60
  10. package/dist/internal/src/apis/GameApi.d.ts +0 -20
  11. package/dist/internal/src/apis/GameApi.js +25 -60
  12. package/dist/internal/src/apis/ImageApi.d.ts +0 -44
  13. package/dist/internal/src/apis/ImageApi.js +55 -132
  14. package/dist/internal/src/apis/MiscApi.d.ts +0 -60
  15. package/dist/internal/src/apis/MiscApi.js +75 -180
  16. package/dist/internal/src/apis/NetworkApi.d.ts +0 -40
  17. package/dist/internal/src/apis/NetworkApi.js +50 -120
  18. package/dist/internal/src/apis/PoemApi.d.ts +0 -4
  19. package/dist/internal/src/apis/PoemApi.js +5 -12
  20. package/dist/internal/src/apis/RandomApi.d.ts +0 -16
  21. package/dist/internal/src/apis/RandomApi.js +20 -48
  22. package/dist/internal/src/apis/SocialApi.d.ts +0 -32
  23. package/dist/internal/src/apis/SocialApi.js +40 -96
  24. package/dist/internal/src/apis/StatusApi.d.ts +0 -8
  25. package/dist/internal/src/apis/StatusApi.js +10 -24
  26. package/dist/internal/src/apis/TextApi.d.ts +0 -44
  27. package/dist/internal/src/apis/TextApi.js +55 -132
  28. package/dist/internal/src/apis/TranslateApi.d.ts +0 -16
  29. package/dist/internal/src/apis/TranslateApi.js +20 -48
  30. package/dist/internal/src/apis/WebParseApi.d.ts +0 -16
  31. package/dist/internal/src/apis/WebParseApi.js +20 -48
  32. package/dist/internal/src/models/GetMiscHolidayCalendar200ResponseHolidaysInner.d.ts +1 -1
  33. package/dist/internal/src/models/GetMiscWeather200Response.d.ts +1 -1
  34. package/dist/internal/src/models/PostAiTranslateRequest.d.ts +2 -2
  35. package/dist/internal/src/models/PostSearchAggregateRequest.d.ts +2 -2
  36. package/dist/internal/src/models/PostSensitiveWordAnalyze200ResponseResultsInner.d.ts +2 -2
  37. package/dist/internal/src/models/PostTextAesDecryptAdvancedRequest.d.ts +2 -2
  38. package/dist/internal/src/models/PostTextAesEncryptAdvancedRequest.d.ts +3 -3
  39. package/dist/internal/src/models/PostTextConvertRequest.d.ts +2 -2
  40. package/dist/internal/src/models/PostTranslateStream400Response.d.ts +1 -1
  41. package/dist/internal/src/runtime.js +0 -15
  42. package/dist/src/errors.d.ts +85 -0
  43. package/dist/src/errors.js +247 -0
  44. package/dist/src/index.d.ts +5 -6
  45. package/dist/src/index.js +9 -10
  46. package/internal/.openapi-generator/VERSION +1 -1
  47. package/internal/src/apis/ClipzyApi.ts +15 -39
  48. package/internal/src/apis/ConvertApi.ts +10 -26
  49. package/internal/src/apis/DailyApi.ts +5 -13
  50. package/internal/src/apis/DefaultApi.ts +25 -65
  51. package/internal/src/apis/GameApi.ts +25 -65
  52. package/internal/src/apis/ImageApi.ts +55 -143
  53. package/internal/src/apis/MiscApi.ts +75 -195
  54. package/internal/src/apis/NetworkApi.ts +50 -130
  55. package/internal/src/apis/PoemApi.ts +5 -13
  56. package/internal/src/apis/RandomApi.ts +20 -52
  57. package/internal/src/apis/SocialApi.ts +40 -104
  58. package/internal/src/apis/StatusApi.ts +10 -26
  59. package/internal/src/apis/TextApi.ts +55 -143
  60. package/internal/src/apis/TranslateApi.ts +20 -52
  61. package/internal/src/apis/WebParseApi.ts +20 -52
  62. package/internal/src/models/GetMiscHolidayCalendar200ResponseHolidaysInner.ts +1 -1
  63. package/internal/src/models/GetMiscWeather200Response.ts +1 -1
  64. package/internal/src/models/PostAiTranslateRequest.ts +2 -2
  65. package/internal/src/models/PostSearchAggregateRequest.ts +2 -2
  66. package/internal/src/models/PostSensitiveWordAnalyze200ResponseResultsInner.ts +2 -2
  67. package/internal/src/models/PostTextAesDecryptAdvancedRequest.ts +2 -2
  68. package/internal/src/models/PostTextAesEncryptAdvancedRequest.ts +3 -3
  69. package/internal/src/models/PostTextConvertRequest.ts +2 -2
  70. package/internal/src/models/PostTranslateStream400Response.ts +1 -1
  71. package/internal/src/runtime.ts +0 -18
  72. package/package.json +1 -1
  73. package/src/errors.ts +282 -0
  74. package/src/index.ts +12 -8
@@ -225,9 +225,10 @@ export interface PostMiscDateDiffOperationRequest {
225
225
  export class MiscApi extends runtime.BaseAPI {
226
226
 
227
227
  /**
228
- * Creates request options for getHistoryProgrammer without sending the request
228
+ * 想查看程序员历史上某个特定日期发生的大事件?指定月份和日期,我们就能告诉你! ## 功能概述 通过指定月份和日期,获取该日发生的程序员相关历史事件。同样使用AI智能筛选,确保事件的相关性和重要性。
229
+ * 程序员历史事件
229
230
  */
230
- async getHistoryProgrammerRequestOpts(requestParameters: GetHistoryProgrammerRequest): Promise<runtime.RequestOpts> {
231
+ async getHistoryProgrammerRaw(requestParameters: GetHistoryProgrammerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoryProgrammer200Response>> {
231
232
  if (requestParameters['month'] == null) {
232
233
  throw new runtime.RequiredError(
233
234
  'month',
@@ -257,21 +258,12 @@ export class MiscApi extends runtime.BaseAPI {
257
258
 
258
259
  let urlPath = `/history/programmer`;
259
260
 
260
- return {
261
+ const response = await this.request({
261
262
  path: urlPath,
262
263
  method: 'GET',
263
264
  headers: headerParameters,
264
265
  query: queryParameters,
265
- };
266
- }
267
-
268
- /**
269
- * 想查看程序员历史上某个特定日期发生的大事件?指定月份和日期,我们就能告诉你! ## 功能概述 通过指定月份和日期,获取该日发生的程序员相关历史事件。同样使用AI智能筛选,确保事件的相关性和重要性。
270
- * 程序员历史事件
271
- */
272
- async getHistoryProgrammerRaw(requestParameters: GetHistoryProgrammerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoryProgrammer200Response>> {
273
- const requestOptions = await this.getHistoryProgrammerRequestOpts(requestParameters);
274
- const response = await this.request(requestOptions, initOverrides);
266
+ }, initOverrides);
275
267
 
276
268
  return new runtime.JSONApiResponse(response, (jsonValue) => GetHistoryProgrammer200ResponseFromJSON(jsonValue));
277
269
  }
@@ -286,9 +278,10 @@ export class MiscApi extends runtime.BaseAPI {
286
278
  }
287
279
 
288
280
  /**
289
- * Creates request options for getHistoryProgrammerToday without sending the request
281
+ * 想知道程序员历史上的今天发生了什么大事吗?这个接口告诉你答案! ## 功能概述 我们使用AI智能筛选从海量历史事件中挑选出与程序员、计算机科学相关的重要事件。每个事件都经过重要性评分和相关性评分,确保内容质量。
282
+ * 程序员历史上的今天
290
283
  */
291
- async getHistoryProgrammerTodayRequestOpts(): Promise<runtime.RequestOpts> {
284
+ async getHistoryProgrammerTodayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoryProgrammerToday200Response>> {
292
285
  const queryParameters: any = {};
293
286
 
294
287
  const headerParameters: runtime.HTTPHeaders = {};
@@ -296,21 +289,12 @@ export class MiscApi extends runtime.BaseAPI {
296
289
 
297
290
  let urlPath = `/history/programmer/today`;
298
291
 
299
- return {
292
+ const response = await this.request({
300
293
  path: urlPath,
301
294
  method: 'GET',
302
295
  headers: headerParameters,
303
296
  query: queryParameters,
304
- };
305
- }
306
-
307
- /**
308
- * 想知道程序员历史上的今天发生了什么大事吗?这个接口告诉你答案! ## 功能概述 我们使用AI智能筛选从海量历史事件中挑选出与程序员、计算机科学相关的重要事件。每个事件都经过重要性评分和相关性评分,确保内容质量。
309
- * 程序员历史上的今天
310
- */
311
- async getHistoryProgrammerTodayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoryProgrammerToday200Response>> {
312
- const requestOptions = await this.getHistoryProgrammerTodayRequestOpts();
313
- const response = await this.request(requestOptions, initOverrides);
297
+ }, initOverrides);
314
298
 
315
299
  return new runtime.JSONApiResponse(response, (jsonValue) => GetHistoryProgrammerToday200ResponseFromJSON(jsonValue));
316
300
  }
@@ -325,9 +309,10 @@ export class MiscApi extends runtime.BaseAPI {
325
309
  }
326
310
 
327
311
  /**
328
- * Creates request options for getMiscDistrict without sending the request
312
+ * 一个接口,覆盖全球 243 个国家、中国省/市/区/街道四级行政区划,支持关键词搜索、行政编码查询、坐标反查三种查询模式(必须至少传入一种查询参数)。 ## 功能概述 根据用户输入的搜索条件快速查找行政区域信息。例如:中国 > 山东省 > 济南市 > 历下区 > 舜华路街道。 无需注册、无需密钥,直接调用即可获取结构化的行政区域数据。支持三种查询方式: - 传 `adcode`,按行政编码精确查询,同时返回下级区划列表 - 传 `lat` + `lng`,坐标反查附近地点 - 传 `keywords`,按关键词搜索,支持中英文 ## 中国与国际数据差异 中国数据包含 `adcode`、`citycode` 等字段,支持省/市/区/街道四级逐级查询;国际城市数据不含这些字段,但额外提供 `population`(人口)和 `timezone`(时区)。 > [!NOTE] > 部分城市(如东莞、文昌)没有区县层级,市级下方直接显示街道。街道级别的 `adcode` 返回的是所属区县的 `adcode`。
313
+ * Adcode 国内外行政区域查询
329
314
  */
330
- async getMiscDistrictRequestOpts(requestParameters: GetMiscDistrictRequest): Promise<runtime.RequestOpts> {
315
+ async getMiscDistrictRaw(requestParameters: GetMiscDistrictRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscDistrict200Response>> {
331
316
  const queryParameters: any = {};
332
317
 
333
318
  if (requestParameters['keywords'] != null) {
@@ -363,21 +348,12 @@ export class MiscApi extends runtime.BaseAPI {
363
348
 
364
349
  let urlPath = `/misc/district`;
365
350
 
366
- return {
351
+ const response = await this.request({
367
352
  path: urlPath,
368
353
  method: 'GET',
369
354
  headers: headerParameters,
370
355
  query: queryParameters,
371
- };
372
- }
373
-
374
- /**
375
- * 一个接口,覆盖全球 243 个国家、中国省/市/区/街道四级行政区划,支持关键词搜索、行政编码查询、坐标反查三种查询模式(必须至少传入一种查询参数)。 ## 功能概述 根据用户输入的搜索条件快速查找行政区域信息。例如:中国 > 山东省 > 济南市 > 历下区 > 舜华路街道。 无需注册、无需密钥,直接调用即可获取结构化的行政区域数据。支持三种查询方式: - 传 `adcode`,按行政编码精确查询,同时返回下级区划列表 - 传 `lat` + `lng`,坐标反查附近地点 - 传 `keywords`,按关键词搜索,支持中英文 ## 中国与国际数据差异 中国数据包含 `adcode`、`citycode` 等字段,支持省/市/区/街道四级逐级查询;国际城市数据不含这些字段,但额外提供 `population`(人口)和 `timezone`(时区)。 > [!NOTE] > 部分城市(如东莞、文昌)没有区县层级,市级下方直接显示街道。街道级别的 `adcode` 返回的是所属区县的 `adcode`。
376
- * Adcode 国内外行政区域查询
377
- */
378
- async getMiscDistrictRaw(requestParameters: GetMiscDistrictRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscDistrict200Response>> {
379
- const requestOptions = await this.getMiscDistrictRequestOpts(requestParameters);
380
- const response = await this.request(requestOptions, initOverrides);
356
+ }, initOverrides);
381
357
 
382
358
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscDistrict200ResponseFromJSON(jsonValue));
383
359
  }
@@ -392,9 +368,10 @@ export class MiscApi extends runtime.BaseAPI {
392
368
  }
393
369
 
394
370
  /**
395
- * Creates request options for getMiscHolidayCalendar without sending the request
371
+ * 查询指定日期、月份或年份的万年历与节假日信息。 ## 功能概述 这个接口支持三种查询方式:按天(`date`)、按月(`month`)和按年(`year`)。调用时三者选一个传入即可。 如果你只关心某一类事件,可以通过 `holiday_type` 进行筛选,例如只看法定休假/调休、公历节日、农历节日或节气。 在 `date` 模式下,传 `include_nearby=true` 可以额外返回该日期前后最近的节日;返回数量由 `nearby_limit` 控制,默认 7,最大 30。
372
+ * 查询节假日与万年历
396
373
  */
397
- async getMiscHolidayCalendarRequestOpts(requestParameters: GetMiscHolidayCalendarRequest): Promise<runtime.RequestOpts> {
374
+ async getMiscHolidayCalendarRaw(requestParameters: GetMiscHolidayCalendarRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscHolidayCalendar200Response>> {
398
375
  const queryParameters: any = {};
399
376
 
400
377
  if (requestParameters['date'] != null) {
@@ -430,21 +407,12 @@ export class MiscApi extends runtime.BaseAPI {
430
407
 
431
408
  let urlPath = `/misc/holiday-calendar`;
432
409
 
433
- return {
410
+ const response = await this.request({
434
411
  path: urlPath,
435
412
  method: 'GET',
436
413
  headers: headerParameters,
437
414
  query: queryParameters,
438
- };
439
- }
440
-
441
- /**
442
- * 查询指定日期、月份或年份的万年历与节假日信息。 ## 功能概述 这个接口支持三种查询方式:按天(`date`)、按月(`month`)和按年(`year`)。调用时三者选一个传入即可。 如果你只关心某一类事件,可以通过 `holiday_type` 进行筛选,例如只看法定休假/调休、公历节日、农历节日或节气。 在 `date` 模式下,传 `include_nearby=true` 可以额外返回该日期前后最近的节日;返回数量由 `nearby_limit` 控制,默认 7,最大 30。
443
- * 查询节假日与万年历
444
- */
445
- async getMiscHolidayCalendarRaw(requestParameters: GetMiscHolidayCalendarRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscHolidayCalendar200Response>> {
446
- const requestOptions = await this.getMiscHolidayCalendarRequestOpts(requestParameters);
447
- const response = await this.request(requestOptions, initOverrides);
415
+ }, initOverrides);
448
416
 
449
417
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscHolidayCalendar200ResponseFromJSON(jsonValue));
450
418
  }
@@ -459,9 +427,10 @@ export class MiscApi extends runtime.BaseAPI {
459
427
  }
460
428
 
461
429
  /**
462
- * Creates request options for getMiscHotboard without sending the request
430
+ * 想快速跟上网络热点?这个接口让你一网打尽各大主流平台的实时热榜/热搜! ## 功能概述 你只需要指定一个平台类型,就能获取到该平台当前的热榜数据列表。每个热榜条目都包含标题、热度值和原始链接。非常适合用于制作信息聚合类应用或看板。 ## 三种使用模式 ### 默认模式 只传 `type` 参数,返回该平台当前的实时热榜。 ### 时光机模式 传 `type` + `time` 参数,返回最接近指定时间的热榜快照。如果不可用或无数据,会返回空。 ### 搜索模式 传 `type` + `keyword` + `time_start` + `time_end` 参数,在指定时间范围内搜索包含关键词的热榜条目。可选传 `limit` 限制返回数量。 ### 数据源列表 传 `sources=true`,返回所有支持历史数据的平台列表。
431
+ * 查询热榜
463
432
  */
464
- async getMiscHotboardRequestOpts(requestParameters: GetMiscHotboardRequest): Promise<runtime.RequestOpts> {
433
+ async getMiscHotboardRaw(requestParameters: GetMiscHotboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscHotboard200Response>> {
465
434
  if (requestParameters['type'] == null) {
466
435
  throw new runtime.RequiredError(
467
436
  'type',
@@ -504,21 +473,12 @@ export class MiscApi extends runtime.BaseAPI {
504
473
 
505
474
  let urlPath = `/misc/hotboard`;
506
475
 
507
- return {
476
+ const response = await this.request({
508
477
  path: urlPath,
509
478
  method: 'GET',
510
479
  headers: headerParameters,
511
480
  query: queryParameters,
512
- };
513
- }
514
-
515
- /**
516
- * 想快速跟上网络热点?这个接口让你一网打尽各大主流平台的实时热榜/热搜! ## 功能概述 你只需要指定一个平台类型,就能获取到该平台当前的热榜数据列表。每个热榜条目都包含标题、热度值和原始链接。非常适合用于制作信息聚合类应用或看板。 ## 三种使用模式 ### 默认模式 只传 `type` 参数,返回该平台当前的实时热榜。 ### 时光机模式 传 `type` + `time` 参数,返回最接近指定时间的热榜快照。如果不可用或无数据,会返回空。 ### 搜索模式 传 `type` + `keyword` + `time_start` + `time_end` 参数,在指定时间范围内搜索包含关键词的热榜条目。可选传 `limit` 限制返回数量。 ### 数据源列表 传 `sources=true`,返回所有支持历史数据的平台列表。
517
- * 查询热榜
518
- */
519
- async getMiscHotboardRaw(requestParameters: GetMiscHotboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscHotboard200Response>> {
520
- const requestOptions = await this.getMiscHotboardRequestOpts(requestParameters);
521
- const response = await this.request(requestOptions, initOverrides);
481
+ }, initOverrides);
522
482
 
523
483
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscHotboard200ResponseFromJSON(jsonValue));
524
484
  }
@@ -533,9 +493,10 @@ export class MiscApi extends runtime.BaseAPI {
533
493
  }
534
494
 
535
495
  /**
536
- * Creates request options for getMiscLunartime without sending the request
496
+ * 需要在指定时区下查看某个时间点的农历信息?这个接口可以直接返回完整结果。 ## 功能概述 支持传入 Unix 时间戳(秒或毫秒)和 IANA 时区名,返回公历时间、星期、农历年月日、干支、生肖、节气与节日信息。不传 `ts` 时默认使用当前时间,不传 `timezone` 时默认 `Asia/Shanghai`。 ## 时区说明 - 支持标准 IANA 时区,例如 `Asia/Shanghai`、`Asia/Tokyo` - 也支持别名:`Shanghai`、`Beijing` - 时区非法时返回 400 并提示 `invalid timezone: xxx`
497
+ * 查询农历时间
537
498
  */
538
- async getMiscLunartimeRequestOpts(requestParameters: GetMiscLunartimeRequest): Promise<runtime.RequestOpts> {
499
+ async getMiscLunartimeRaw(requestParameters: GetMiscLunartimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscLunartime200Response>> {
539
500
  const queryParameters: any = {};
540
501
 
541
502
  if (requestParameters['ts'] != null) {
@@ -551,21 +512,12 @@ export class MiscApi extends runtime.BaseAPI {
551
512
 
552
513
  let urlPath = `/misc/lunartime`;
553
514
 
554
- return {
515
+ const response = await this.request({
555
516
  path: urlPath,
556
517
  method: 'GET',
557
518
  headers: headerParameters,
558
519
  query: queryParameters,
559
- };
560
- }
561
-
562
- /**
563
- * 需要在指定时区下查看某个时间点的农历信息?这个接口可以直接返回完整结果。 ## 功能概述 支持传入 Unix 时间戳(秒或毫秒)和 IANA 时区名,返回公历时间、星期、农历年月日、干支、生肖、节气与节日信息。不传 `ts` 时默认使用当前时间,不传 `timezone` 时默认 `Asia/Shanghai`。 ## 时区说明 - 支持标准 IANA 时区,例如 `Asia/Shanghai`、`Asia/Tokyo` - 也支持别名:`Shanghai`、`Beijing` - 时区非法时返回 400 并提示 `invalid timezone: xxx`
564
- * 查询农历时间
565
- */
566
- async getMiscLunartimeRaw(requestParameters: GetMiscLunartimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscLunartime200Response>> {
567
- const requestOptions = await this.getMiscLunartimeRequestOpts(requestParameters);
568
- const response = await this.request(requestOptions, initOverrides);
520
+ }, initOverrides);
569
521
 
570
522
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscLunartime200ResponseFromJSON(jsonValue));
571
523
  }
@@ -580,9 +532,10 @@ export class MiscApi extends runtime.BaseAPI {
580
532
  }
581
533
 
582
534
  /**
583
- * Creates request options for getMiscPhoneinfo without sending the request
535
+ * 想知道一个手机号码来自哪里?是移动、联通还是电信?这个接口可以告诉你答案。 ## 功能概述 提供一个国内的手机号码,我们会查询并返回它的归属地(省份和城市)以及所属的运营商信息。
536
+ * 查询手机归属地
584
537
  */
585
- async getMiscPhoneinfoRequestOpts(requestParameters: GetMiscPhoneinfoRequest): Promise<runtime.RequestOpts> {
538
+ async getMiscPhoneinfoRaw(requestParameters: GetMiscPhoneinfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscPhoneinfo200Response>> {
586
539
  if (requestParameters['phone'] == null) {
587
540
  throw new runtime.RequiredError(
588
541
  'phone',
@@ -601,21 +554,12 @@ export class MiscApi extends runtime.BaseAPI {
601
554
 
602
555
  let urlPath = `/misc/phoneinfo`;
603
556
 
604
- return {
557
+ const response = await this.request({
605
558
  path: urlPath,
606
559
  method: 'GET',
607
560
  headers: headerParameters,
608
561
  query: queryParameters,
609
- };
610
- }
611
-
612
- /**
613
- * 想知道一个手机号码来自哪里?是移动、联通还是电信?这个接口可以告诉你答案。 ## 功能概述 提供一个国内的手机号码,我们会查询并返回它的归属地(省份和城市)以及所属的运营商信息。
614
- * 查询手机归属地
615
- */
616
- async getMiscPhoneinfoRaw(requestParameters: GetMiscPhoneinfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscPhoneinfo200Response>> {
617
- const requestOptions = await this.getMiscPhoneinfoRequestOpts(requestParameters);
618
- const response = await this.request(requestOptions, initOverrides);
562
+ }, initOverrides);
619
563
 
620
564
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscPhoneinfo200ResponseFromJSON(jsonValue));
621
565
  }
@@ -630,9 +574,10 @@ export class MiscApi extends runtime.BaseAPI {
630
574
  }
631
575
 
632
576
  /**
633
- * Creates request options for getMiscRandomnumber without sending the request
577
+ * 需要一个简单的随机数,还是需要一串不重复的、带小数的随机数?这个接口都能满足你! ## 功能概述 这是一个强大的随机数生成器。你可以指定生成的范围(最大/最小值)、数量、是否允许重复、以及是否生成小数(并指定小数位数)。 ## 流程图 ```mermaid graph TD A[开始] --> B{参数校验}; B --> |通过| C{是否允许小数?}; C --> |是| D[生成随机小数]; C --> |否| E[生成随机整数]; D --> F{是否允许重复?}; E --> F; F --> |是| G[直接生成指定数量]; F --> |否| H[生成不重复的数字]; G --> I[返回结果]; H --> I; B --> |失败| J[返回 400 错误]; ``` ## 使用须知 > [!WARNING] > **不重复生成的逻辑限制** > 当设置 `allow_repeat=false` 时,请确保取值范围 `(max - min + 1)` 大于或等于你请求的数量 `count`。否则,系统将无法生成足够的不重复数字,请求会失败并返回 400 错误。
578
+ * 随机数生成
634
579
  */
635
- async getMiscRandomnumberRequestOpts(requestParameters: GetMiscRandomnumberRequest): Promise<runtime.RequestOpts> {
580
+ async getMiscRandomnumberRaw(requestParameters: GetMiscRandomnumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscRandomnumber200Response>> {
636
581
  const queryParameters: any = {};
637
582
 
638
583
  if (requestParameters['min'] != null) {
@@ -664,21 +609,12 @@ export class MiscApi extends runtime.BaseAPI {
664
609
 
665
610
  let urlPath = `/misc/randomnumber`;
666
611
 
667
- return {
612
+ const response = await this.request({
668
613
  path: urlPath,
669
614
  method: 'GET',
670
615
  headers: headerParameters,
671
616
  query: queryParameters,
672
- };
673
- }
674
-
675
- /**
676
- * 需要一个简单的随机数,还是需要一串不重复的、带小数的随机数?这个接口都能满足你! ## 功能概述 这是一个强大的随机数生成器。你可以指定生成的范围(最大/最小值)、数量、是否允许重复、以及是否生成小数(并指定小数位数)。 ## 流程图 ```mermaid graph TD A[开始] --> B{参数校验}; B --> |通过| C{是否允许小数?}; C --> |是| D[生成随机小数]; C --> |否| E[生成随机整数]; D --> F{是否允许重复?}; E --> F; F --> |是| G[直接生成指定数量]; F --> |否| H[生成不重复的数字]; G --> I[返回结果]; H --> I; B --> |失败| J[返回 400 错误]; ``` ## 使用须知 > [!WARNING] > **不重复生成的逻辑限制** > 当设置 `allow_repeat=false` 时,请确保取值范围 `(max - min + 1)` 大于或等于你请求的数量 `count`。否则,系统将无法生成足够的不重复数字,请求会失败并返回 400 错误。
677
- * 随机数生成
678
- */
679
- async getMiscRandomnumberRaw(requestParameters: GetMiscRandomnumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscRandomnumber200Response>> {
680
- const requestOptions = await this.getMiscRandomnumberRequestOpts(requestParameters);
681
- const response = await this.request(requestOptions, initOverrides);
617
+ }, initOverrides);
682
618
 
683
619
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscRandomnumber200ResponseFromJSON(jsonValue));
684
620
  }
@@ -693,9 +629,10 @@ export class MiscApi extends runtime.BaseAPI {
693
629
  }
694
630
 
695
631
  /**
696
- * Creates request options for getMiscTimestamp without sending the request
632
+ * 这是一个用于将Unix时间戳转换为人类可读日期时间的旧版接口。 ## 功能概述 输入一个秒级或毫秒级的时间戳,返回其对应的本地时间和UTC时间。 > [!WARNING] > **接口已过时**:这个接口已被新的 `/convert/unixtime` 取代。新接口功能更强大,支持双向转换。我们建议你迁移到新接口。 [➡️ 前往新版接口文档](/docs/api-reference/get-convert-unixtime)
633
+ * 转换时间戳 (旧版,推荐使用/convert/unixtime)
697
634
  */
698
- async getMiscTimestampRequestOpts(requestParameters: GetMiscTimestampRequest): Promise<runtime.RequestOpts> {
635
+ async getMiscTimestampRaw(requestParameters: GetMiscTimestampRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTimestamp200Response>> {
699
636
  if (requestParameters['ts'] == null) {
700
637
  throw new runtime.RequiredError(
701
638
  'ts',
@@ -714,21 +651,12 @@ export class MiscApi extends runtime.BaseAPI {
714
651
 
715
652
  let urlPath = `/misc/timestamp`;
716
653
 
717
- return {
654
+ const response = await this.request({
718
655
  path: urlPath,
719
656
  method: 'GET',
720
657
  headers: headerParameters,
721
658
  query: queryParameters,
722
- };
723
- }
724
-
725
- /**
726
- * 这是一个用于将Unix时间戳转换为人类可读日期时间的旧版接口。 ## 功能概述 输入一个秒级或毫秒级的时间戳,返回其对应的本地时间和UTC时间。 > [!WARNING] > **接口已过时**:这个接口已被新的 `/convert/unixtime` 取代。新接口功能更强大,支持双向转换。我们建议你迁移到新接口。 [➡️ 前往新版接口文档](/docs/api-reference/get-convert-unixtime)
727
- * 转换时间戳 (旧版,推荐使用/convert/unixtime)
728
- */
729
- async getMiscTimestampRaw(requestParameters: GetMiscTimestampRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTimestamp200Response>> {
730
- const requestOptions = await this.getMiscTimestampRequestOpts(requestParameters);
731
- const response = await this.request(requestOptions, initOverrides);
659
+ }, initOverrides);
732
660
 
733
661
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscTimestamp200ResponseFromJSON(jsonValue));
734
662
  }
@@ -743,9 +671,10 @@ export class MiscApi extends runtime.BaseAPI {
743
671
  }
744
672
 
745
673
  /**
746
- * Creates request options for getMiscTrackingCarriers without sending the request
674
+ * 不确定系统支持哪些快递公司?这个接口返回完整的支持列表。 ## 功能概述 获取系统当前支持的所有快递公司列表,包括每家公司的标准编码(code)和中文名称(name)。 ## 使用建议 - **推荐缓存**:这个列表基本不会频繁变动,建议在应用启动时调用一次并缓存到本地 - **应用场景**:适合用于构建快递公司选择器、下拉菜单等UI组件 - **缓存时长**:建议缓存24小时或更久
675
+ * 获取支持的快递公司列表
747
676
  */
748
- async getMiscTrackingCarriersRequestOpts(): Promise<runtime.RequestOpts> {
677
+ async getMiscTrackingCarriersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingCarriers200Response>> {
749
678
  const queryParameters: any = {};
750
679
 
751
680
  const headerParameters: runtime.HTTPHeaders = {};
@@ -753,21 +682,12 @@ export class MiscApi extends runtime.BaseAPI {
753
682
 
754
683
  let urlPath = `/misc/tracking/carriers`;
755
684
 
756
- return {
685
+ const response = await this.request({
757
686
  path: urlPath,
758
687
  method: 'GET',
759
688
  headers: headerParameters,
760
689
  query: queryParameters,
761
- };
762
- }
763
-
764
- /**
765
- * 不确定系统支持哪些快递公司?这个接口返回完整的支持列表。 ## 功能概述 获取系统当前支持的所有快递公司列表,包括每家公司的标准编码(code)和中文名称(name)。 ## 使用建议 - **推荐缓存**:这个列表基本不会频繁变动,建议在应用启动时调用一次并缓存到本地 - **应用场景**:适合用于构建快递公司选择器、下拉菜单等UI组件 - **缓存时长**:建议缓存24小时或更久
766
- * 获取支持的快递公司列表
767
- */
768
- async getMiscTrackingCarriersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingCarriers200Response>> {
769
- const requestOptions = await this.getMiscTrackingCarriersRequestOpts();
770
- const response = await this.request(requestOptions, initOverrides);
690
+ }, initOverrides);
771
691
 
772
692
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscTrackingCarriers200ResponseFromJSON(jsonValue));
773
693
  }
@@ -782,9 +702,10 @@ export class MiscApi extends runtime.BaseAPI {
782
702
  }
783
703
 
784
704
  /**
785
- * Creates request options for getMiscTrackingDetect without sending the request
705
+ * 不确定手里的快递单号属于哪家快递公司?这个接口专门做识别,不查物流。 ## 功能概述 输入快递单号,系统会根据单号规则快速识别出最可能的快递公司。如果存在多个可能的匹配结果,还会在 `alternatives` 字段中返回备选项,供你参考选择。 ## 使用须知 - **识别速度快**:只做规则匹配,不查询物流信息,响应速度通常在100ms内 - **准确率高**:基于各快递公司的单号规则进行智能识别,准确率超过95% - **备选方案**:当单号规则可能匹配多家快递公司时,会提供所有可能的选项
706
+ * 识别快递公司
786
707
  */
787
- async getMiscTrackingDetectRequestOpts(requestParameters: GetMiscTrackingDetectRequest): Promise<runtime.RequestOpts> {
708
+ async getMiscTrackingDetectRaw(requestParameters: GetMiscTrackingDetectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingDetect200Response>> {
788
709
  if (requestParameters['trackingNumber'] == null) {
789
710
  throw new runtime.RequiredError(
790
711
  'trackingNumber',
@@ -803,21 +724,12 @@ export class MiscApi extends runtime.BaseAPI {
803
724
 
804
725
  let urlPath = `/misc/tracking/detect`;
805
726
 
806
- return {
727
+ const response = await this.request({
807
728
  path: urlPath,
808
729
  method: 'GET',
809
730
  headers: headerParameters,
810
731
  query: queryParameters,
811
- };
812
- }
813
-
814
- /**
815
- * 不确定手里的快递单号属于哪家快递公司?这个接口专门做识别,不查物流。 ## 功能概述 输入快递单号,系统会根据单号规则快速识别出最可能的快递公司。如果存在多个可能的匹配结果,还会在 `alternatives` 字段中返回备选项,供你参考选择。 ## 使用须知 - **识别速度快**:只做规则匹配,不查询物流信息,响应速度通常在100ms内 - **准确率高**:基于各快递公司的单号规则进行智能识别,准确率超过95% - **备选方案**:当单号规则可能匹配多家快递公司时,会提供所有可能的选项
816
- * 识别快递公司
817
- */
818
- async getMiscTrackingDetectRaw(requestParameters: GetMiscTrackingDetectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingDetect200Response>> {
819
- const requestOptions = await this.getMiscTrackingDetectRequestOpts(requestParameters);
820
- const response = await this.request(requestOptions, initOverrides);
732
+ }, initOverrides);
821
733
 
822
734
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscTrackingDetect200ResponseFromJSON(jsonValue));
823
735
  }
@@ -832,9 +744,10 @@ export class MiscApi extends runtime.BaseAPI {
832
744
  }
833
745
 
834
746
  /**
835
- * Creates request options for getMiscTrackingQuery without sending the request
747
+ * 买了东西想知道快递到哪儿了?这个接口帮你实时追踪物流状态。 ## 功能概述 提供一个快递单号,系统会自动识别快递公司并返回完整的物流轨迹信息。这个接口目前可以查询中通、圆通、韵达、申通、极兔、京东、EMS、德邦等主流快递公司的物流信息。 ## 使用须知 目前暂不支持顺丰快递单号的物流查询。 - **自动识别**:不知道是哪家快递?系统会根据单号规则自动识别快递公司(推荐使用) - **手动指定**:如果已知快递公司,可以传递 `carrier_code` 参数,查询速度会更快 - **手机尾号验证**:部分快递公司需要验证收件人手机尾号才能查询详细物流,如果返回 `暂无物流信息`,建议尝试传入 `phone` 参数 - **查询时效**:物流信息实时查询,响应时间通常在1-2秒内
748
+ * 查询快递物流信息
836
749
  */
837
- async getMiscTrackingQueryRequestOpts(requestParameters: GetMiscTrackingQueryRequest): Promise<runtime.RequestOpts> {
750
+ async getMiscTrackingQueryRaw(requestParameters: GetMiscTrackingQueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingQuery200Response>> {
838
751
  if (requestParameters['trackingNumber'] == null) {
839
752
  throw new runtime.RequiredError(
840
753
  'trackingNumber',
@@ -861,21 +774,12 @@ export class MiscApi extends runtime.BaseAPI {
861
774
 
862
775
  let urlPath = `/misc/tracking/query`;
863
776
 
864
- return {
777
+ const response = await this.request({
865
778
  path: urlPath,
866
779
  method: 'GET',
867
780
  headers: headerParameters,
868
781
  query: queryParameters,
869
- };
870
- }
871
-
872
- /**
873
- * 买了东西想知道快递到哪儿了?这个接口帮你实时追踪物流状态。 ## 功能概述 提供一个快递单号,系统会自动识别快递公司并返回完整的物流轨迹信息。这个接口目前可以查询中通、圆通、韵达、申通、极兔、京东、EMS、德邦等主流快递公司的物流信息。 ## 使用须知 目前暂不支持顺丰快递单号的物流查询。 - **自动识别**:不知道是哪家快递?系统会根据单号规则自动识别快递公司(推荐使用) - **手动指定**:如果已知快递公司,可以传递 `carrier_code` 参数,查询速度会更快 - **手机尾号验证**:部分快递公司需要验证收件人手机尾号才能查询详细物流,如果返回 `暂无物流信息`,建议尝试传入 `phone` 参数 - **查询时效**:物流信息实时查询,响应时间通常在1-2秒内
874
- * 查询快递物流信息
875
- */
876
- async getMiscTrackingQueryRaw(requestParameters: GetMiscTrackingQueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscTrackingQuery200Response>> {
877
- const requestOptions = await this.getMiscTrackingQueryRequestOpts(requestParameters);
878
- const response = await this.request(requestOptions, initOverrides);
782
+ }, initOverrides);
879
783
 
880
784
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscTrackingQuery200ResponseFromJSON(jsonValue));
881
785
  }
@@ -890,9 +794,10 @@ export class MiscApi extends runtime.BaseAPI {
890
794
  }
891
795
 
892
796
  /**
893
- * Creates request options for getMiscWeather without sending the request
797
+ * 出门前,查一下天气总是个好习惯。这个接口为你提供精准、实时的天气数据,支持国内和国际城市。 ## 功能概述 这个接口支持三种查询方式: - 可以传 `adcode`,按行政区编码查询(优先级最高) - 可以传 `city`,按城市名称查询,支持中文(`北京`)和英文(`Tokyo`) - 两个都不传时,按客户端 IP 自动定位查询 支持 `lang` 参数,可选 `zh`(默认)和 `en`,城市名翻译覆盖 7000+ 城市。 ## 可选功能模块 - `extended=true`:扩展气象字段(体感温度、能见度、气压、紫外线、空气质量及污染物分项数据) - `forecast=true`:多天预报(最多7天,会额外返回每天的最高温度、最低温度,以及日出日落、风速等详细数据) - `hourly=true`:逐小时预报(24小时) - `minutely=true`:分钟级降水预报(仅国内城市,精确到2分钟) - `indices=true`:18项生活指数(穿衣、紫外线、洗车、运动、花粉等) ## 天气字段说明 `weather` 是天气现象文本,不是固定枚举。 常见值包括:晴、多云、阴、小雨、中雨、大雨、雷阵雨、小雪、中雪、大雪、雨夹雪、雾、霾、沙尘。 如果你的业务需要稳定的天气分类,建议使用 `weather_code` 进行映射。完整的天气图标代码请参考[天气图标代码表](#enum-list)。
798
+ * 查询天气
894
799
  */
895
- async getMiscWeatherRequestOpts(requestParameters: GetMiscWeatherRequest): Promise<runtime.RequestOpts> {
800
+ async getMiscWeatherRaw(requestParameters: GetMiscWeatherRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscWeather200Response>> {
896
801
  const queryParameters: any = {};
897
802
 
898
803
  if (requestParameters['city'] != null) {
@@ -932,21 +837,12 @@ export class MiscApi extends runtime.BaseAPI {
932
837
 
933
838
  let urlPath = `/misc/weather`;
934
839
 
935
- return {
840
+ const response = await this.request({
936
841
  path: urlPath,
937
842
  method: 'GET',
938
843
  headers: headerParameters,
939
844
  query: queryParameters,
940
- };
941
- }
942
-
943
- /**
944
- * 出门前,查一下天气总是个好习惯。这个接口为你提供精准、实时的天气数据,支持国内和国际城市。 ## 功能概述 这个接口支持三种查询方式: - 可以传 `adcode`,按行政区编码查询(优先级最高) - 可以传 `city`,按城市名称查询,支持中文(`北京`)和英文(`Tokyo`) - 两个都不传时,按客户端 IP 自动定位查询 支持 `lang` 参数,可选 `zh`(默认)和 `en`,城市名翻译覆盖 7000+ 城市。 ## 可选功能模块 - `extended=true`:扩展气象字段(体感温度、能见度、气压、紫外线、空气质量及污染物分项数据) - `forecast=true`:多天预报(最多7天,会额外返回每天的最高温度、最低温度,以及日出日落、风速等详细数据) - `hourly=true`:逐小时预报(24小时) - `minutely=true`:分钟级降水预报(仅国内城市,精确到2分钟) - `indices=true`:18项生活指数(穿衣、紫外线、洗车、运动、花粉等) ## 天气字段说明 `weather` 是天气现象文本,不是固定枚举。 常见值包括:晴、多云、阴、小雨、中雨、大雨、雷阵雨、小雪、中雪、大雪、雨夹雪、雾、霾、沙尘。 如果你的业务需要稳定的天气分类,建议使用 `weather_code` 进行映射。完整的天气图标代码请参考[天气图标代码表](#enum-list)。
945
- * 查询天气
946
- */
947
- async getMiscWeatherRaw(requestParameters: GetMiscWeatherRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscWeather200Response>> {
948
- const requestOptions = await this.getMiscWeatherRequestOpts(requestParameters);
949
- const response = await this.request(requestOptions, initOverrides);
845
+ }, initOverrides);
950
846
 
951
847
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscWeather200ResponseFromJSON(jsonValue));
952
848
  }
@@ -961,9 +857,10 @@ export class MiscApi extends runtime.BaseAPI {
961
857
  }
962
858
 
963
859
  /**
964
- * Creates request options for getMiscWorldtime without sending the request
860
+ * 需要和国外的朋友开会,想知道他那边现在几点?用这个接口一查便知。 ## 功能概述 根据标准的时区名称(例如 \'Asia/Shanghai\' \'Europe/London\'),获取该时区的当前准确时间、UTC偏移量、星期等信息。
861
+ * 查询世界时间
965
862
  */
966
- async getMiscWorldtimeRequestOpts(requestParameters: GetMiscWorldtimeRequest): Promise<runtime.RequestOpts> {
863
+ async getMiscWorldtimeRaw(requestParameters: GetMiscWorldtimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscWorldtime200Response>> {
967
864
  if (requestParameters['city'] == null) {
968
865
  throw new runtime.RequiredError(
969
866
  'city',
@@ -982,21 +879,12 @@ export class MiscApi extends runtime.BaseAPI {
982
879
 
983
880
  let urlPath = `/misc/worldtime`;
984
881
 
985
- return {
882
+ const response = await this.request({
986
883
  path: urlPath,
987
884
  method: 'GET',
988
885
  headers: headerParameters,
989
886
  query: queryParameters,
990
- };
991
- }
992
-
993
- /**
994
- * 需要和国外的朋友开会,想知道他那边现在几点?用这个接口一查便知。 ## 功能概述 根据标准的时区名称(例如 \'Asia/Shanghai\' 或 \'Europe/London\'),获取该时区的当前准确时间、UTC偏移量、星期等信息。
995
- * 查询世界时间
996
- */
997
- async getMiscWorldtimeRaw(requestParameters: GetMiscWorldtimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMiscWorldtime200Response>> {
998
- const requestOptions = await this.getMiscWorldtimeRequestOpts(requestParameters);
999
- const response = await this.request(requestOptions, initOverrides);
887
+ }, initOverrides);
1000
888
 
1001
889
  return new runtime.JSONApiResponse(response, (jsonValue) => GetMiscWorldtime200ResponseFromJSON(jsonValue));
1002
890
  }
@@ -1011,9 +899,10 @@ export class MiscApi extends runtime.BaseAPI {
1011
899
  }
1012
900
 
1013
901
  /**
1014
- * Creates request options for postMiscDateDiff without sending the request
902
+ * 想知道两个日期之间相差多久?这个接口帮你精确计算时间差值。 ## 功能概述 输入开始日期和结束日期,返回它们之间的时间差,包括总天数、总小时数、总分钟数、总秒数、总周数,以及人性化显示格式(如\"1年2月3天\")。 ## 日期格式 接口支持自动识别常见日期格式,包括:YYYY-MM-DD、YYYY/MM/DD、DD-MM-YYYY、ISO 8601(带时区)等。也可以通过`format`参数显式指定格式(如DD-MM-YYYY)。 > [!NOTE] > 当结束日期早于开始日期时,返回的数值为负数。
903
+ * 计算两个日期之间的时间差值
1015
904
  */
1016
- async postMiscDateDiffRequestOpts(requestParameters: PostMiscDateDiffOperationRequest): Promise<runtime.RequestOpts> {
905
+ async postMiscDateDiffRaw(requestParameters: PostMiscDateDiffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostMiscDateDiff200Response>> {
1017
906
  if (requestParameters['postMiscDateDiffRequest'] == null) {
1018
907
  throw new runtime.RequiredError(
1019
908
  'postMiscDateDiffRequest',
@@ -1030,22 +919,13 @@ export class MiscApi extends runtime.BaseAPI {
1030
919
 
1031
920
  let urlPath = `/misc/date-diff`;
1032
921
 
1033
- return {
922
+ const response = await this.request({
1034
923
  path: urlPath,
1035
924
  method: 'POST',
1036
925
  headers: headerParameters,
1037
926
  query: queryParameters,
1038
927
  body: PostMiscDateDiffRequestToJSON(requestParameters['postMiscDateDiffRequest']),
1039
- };
1040
- }
1041
-
1042
- /**
1043
- * 想知道两个日期之间相差多久?这个接口帮你精确计算时间差值。 ## 功能概述 输入开始日期和结束日期,返回它们之间的时间差,包括总天数、总小时数、总分钟数、总秒数、总周数,以及人性化显示格式(如\"1年2月3天\")。 ## 日期格式 接口支持自动识别常见日期格式,包括:YYYY-MM-DD、YYYY/MM/DD、DD-MM-YYYY、ISO 8601(带时区)等。也可以通过`format`参数显式指定格式(如DD-MM-YYYY)。 > [!NOTE] > 当结束日期早于开始日期时,返回的数值为负数。
1044
- * 计算两个日期之间的时间差值
1045
- */
1046
- async postMiscDateDiffRaw(requestParameters: PostMiscDateDiffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostMiscDateDiff200Response>> {
1047
- const requestOptions = await this.postMiscDateDiffRequestOpts(requestParameters);
1048
- const response = await this.request(requestOptions, initOverrides);
928
+ }, initOverrides);
1049
929
 
1050
930
  return new runtime.JSONApiResponse(response, (jsonValue) => PostMiscDateDiff200ResponseFromJSON(jsonValue));
1051
931
  }