uapi-browser-sdk 0.1.3 → 0.1.11
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/.github/workflows/release.yml +7 -11
- package/dist/index.d.ts +8 -0
- package/dist/index.js +400 -78
- package/internal/.openapi-generator/FILES +142 -16
- package/internal/docs/ConvertApi.md +4 -4
- package/internal/docs/DailyApi.md +2 -2
- package/internal/docs/DefaultApi.md +6 -6
- package/internal/docs/EndpointsAggregate.md +1 -1
- package/internal/docs/GameApi.md +21 -18
- package/internal/docs/GetAiTranslateLanguages200Response.md +0 -2
- package/internal/docs/GetAnswerbookAsk200Response.md +0 -2
- package/internal/docs/GetConvertUnixtime200Response.md +0 -2
- package/internal/docs/GetGameEpicFree200Response.md +0 -2
- package/internal/docs/GetGameMinecraftHistoryid200Response.md +12 -7
- package/internal/docs/GetGameMinecraftHistoryid200ResponseResultsInner.md +40 -0
- package/internal/docs/GetGameMinecraftHistoryid200ResponseResultsInnerHistoryInner.md +36 -0
- package/internal/docs/GetGameMinecraftHistoryid400Response.md +1 -1
- package/internal/docs/GetGameMinecraftHistoryid502Response.md +1 -1
- package/internal/docs/GetGameMinecraftServerstatus200Response.md +0 -2
- package/internal/docs/GetGameMinecraftUserinfo200Response.md +0 -2
- package/internal/docs/GetGameMinecraftUserinfo502Response.md +38 -0
- package/internal/docs/GetGameSteamSummary200Response.md +0 -2
- package/internal/docs/GetGithubRepo200Response.md +2 -0
- package/internal/docs/GetGithubRepo200ResponseLatestRelease.md +45 -0
- package/internal/docs/GetHistoryProgrammer200Response.md +0 -2
- package/internal/docs/GetHistoryProgrammerToday200Response.md +0 -2
- package/internal/docs/GetImageTobase64200Response.md +0 -2
- package/internal/docs/GetMiscDistrict200Response.md +36 -0
- package/internal/docs/GetMiscDistrict200ResponseResultsInner.md +58 -0
- package/internal/docs/GetMiscDistrict200ResponseResultsInnerCenter.md +37 -0
- package/internal/docs/GetMiscDistrict400Response.md +36 -0
- package/internal/docs/GetMiscHolidayCalendar200Response.md +38 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseData.md +44 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataDaysInner.md +76 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataHolidaysInner.md +40 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataNearby.md +37 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataNearbyNextInner.md +38 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataNearbyPreviousInner.md +38 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataQuery.md +47 -0
- package/internal/docs/GetMiscHolidayCalendar200ResponseDataSummary.md +47 -0
- package/internal/docs/GetMiscHolidayCalendar400Response.md +36 -0
- package/internal/docs/GetMiscHotboard200Response.md +10 -0
- package/internal/docs/GetMiscHotboard200ResponseListInner.md +2 -0
- package/internal/docs/GetMiscHotboard200ResponseResultsInner.md +38 -0
- package/internal/docs/GetMiscLunartime200Response.md +38 -0
- package/internal/docs/GetMiscLunartime200ResponseData.md +77 -0
- package/internal/docs/GetMiscLunartime400Response.md +36 -0
- package/internal/docs/GetMiscWeather200Response.md +47 -13
- package/internal/docs/GetMiscWeather200ResponseAirPollutants.md +45 -0
- package/internal/docs/GetMiscWeather200ResponseForecastInner.md +66 -0
- package/internal/docs/GetMiscWeather200ResponseHourlyForecastInner.md +62 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndices.md +69 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesAirConditioner.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesAirPurifier.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesAllergy.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesBeer.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesCarWash.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesClothing.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesColdRisk.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesComfort.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesDrying.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesExercise.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesFishing.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesMood.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesPollen.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesSunscreen.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesTraffic.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesTravel.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesUmbrella.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseLifeIndicesUv.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseMinutelyPrecip.md +39 -0
- package/internal/docs/GetMiscWeather200ResponseMinutelyPrecipDataInner.md +38 -0
- package/internal/docs/GetMiscWeather400Response.md +2 -4
- package/internal/docs/GetMiscWeather404Response.md +36 -0
- package/internal/docs/GetMiscWeather500Response.md +1 -3
- package/internal/docs/GetMiscWeather503Response.md +36 -0
- package/internal/docs/GetNetworkDns200Response.md +0 -2
- package/internal/docs/GetNetworkIpinfo200Response.md +12 -28
- package/internal/docs/GetNetworkIpinfo500Response.md +1 -1
- package/internal/docs/GetNetworkMyip200Response.md +52 -0
- package/internal/docs/GetNetworkPing200Response.md +0 -2
- package/internal/docs/GetNetworkPingmyip200Response.md +0 -2
- package/internal/docs/GetNetworkPortscan200Response.md +0 -2
- package/internal/docs/GetNetworkUrlstatus200Response.md +2 -4
- package/internal/docs/GetNetworkUrlstatus200ResponseOneOf.md +37 -0
- package/internal/docs/GetNetworkUrlstatus200ResponseOneOf1.md +37 -0
- package/internal/docs/GetNetworkWhois200Response.md +0 -2
- package/internal/docs/GetNetworkWhois200ResponseOneOf.md +0 -2
- package/internal/docs/GetNetworkWhois200ResponseOneOf1.md +0 -2
- package/internal/docs/GetRandomString200Response.md +0 -2
- package/internal/docs/GetSearchEngines200Response.md +1 -1
- package/internal/docs/GetSearchEngines200ResponseEngine.md +1 -1
- package/internal/docs/GetSocialQqGroupinfo200Response.md +22 -0
- package/internal/docs/GetSocialQqGroupinfo404Response.md +2 -6
- package/internal/docs/GetStatusUsage200Response.md +2 -2
- package/internal/docs/GetStatusUsage200ResponseAnyOf.md +37 -0
- package/internal/docs/GetStatusUsage200ResponseAnyOf1.md +37 -0
- package/internal/docs/GetStatusUsage200ResponseAnyOfEndpointsInner.md +36 -0
- package/internal/docs/GetStatusUsage200ResponseAnyOfUnaggregated.md +36 -0
- package/internal/docs/GetStatusUsage404Response.md +1 -3
- package/internal/docs/ImageApi.md +101 -18
- package/internal/docs/MiscApi.md +388 -34
- package/internal/docs/NetworkApi.md +19 -19
- package/internal/docs/PoemApi.md +2 -2
- package/internal/docs/PostAiTranslate200Response.md +0 -2
- package/internal/docs/PostAnswerbookAsk200Response.md +0 -2
- package/internal/docs/PostConvertJson200Response.md +0 -2
- package/internal/docs/PostImageFrombase64200Response.md +0 -2
- package/internal/docs/PostImageNsfw200Response.md +48 -0
- package/internal/docs/PostImageNsfw400Response.md +36 -0
- package/internal/docs/PostImageNsfw413Response.md +36 -0
- package/internal/docs/PostImageNsfw500Response.md +36 -0
- package/internal/docs/PostMiscDateDiff200Response.md +44 -0
- package/internal/docs/PostMiscDateDiff400Response.md +38 -0
- package/internal/docs/PostMiscDateDiffRequest.md +38 -0
- package/internal/docs/PostSearchAggregateRequest.md +4 -0
- package/internal/docs/PostSensitiveWordAnalyze200ResponseResultsInner.md +6 -10
- package/internal/docs/PostTextAesDecryptAdvanced200Response.md +34 -0
- package/internal/docs/PostTextAesDecryptAdvanced400Response.md +34 -0
- package/internal/docs/PostTextAesDecryptAdvancedRequest.md +42 -0
- package/internal/docs/PostTextAesEncryptAdvanced200Response.md +40 -0
- package/internal/docs/PostTextAesEncryptAdvanced400Response.md +34 -0
- package/internal/docs/PostTextAesEncryptAdvancedRequest.md +44 -0
- package/internal/docs/PostTextConvert200Response.md +42 -0
- package/internal/docs/PostTextConvert400Response.md +38 -0
- package/internal/docs/PostTextConvertRequest.md +40 -0
- package/internal/docs/RandomApi.md +14 -15
- package/internal/docs/SocialApi.md +22 -23
- package/internal/docs/StatusApi.md +4 -6
- package/internal/docs/TextApi.md +223 -16
- package/internal/docs/TranslateApi.md +7 -7
- package/internal/docs/WebParseApi.md +12 -12
- package/internal/src/apis/ConvertApi.ts +4 -4
- package/internal/src/apis/DailyApi.ts +2 -2
- package/internal/src/apis/DefaultApi.ts +8 -8
- package/internal/src/apis/GameApi.ts +22 -21
- package/internal/src/apis/ImageApi.ts +104 -16
- package/internal/src/apis/MiscApi.ts +380 -29
- package/internal/src/apis/NetworkApi.ts +22 -19
- package/internal/src/apis/PoemApi.ts +2 -2
- package/internal/src/apis/RandomApi.ts +23 -24
- package/internal/src/apis/SocialApi.ts +38 -24
- package/internal/src/apis/StatusApi.ts +2 -5
- package/internal/src/apis/TextApi.ts +178 -16
- package/internal/src/apis/TranslateApi.ts +8 -8
- package/internal/src/apis/WebParseApi.ts +16 -16
- package/internal/src/models/GetAiTranslateLanguages200Response.ts +0 -8
- package/internal/src/models/GetAnswerbookAsk200Response.ts +0 -8
- package/internal/src/models/GetConvertUnixtime200Response.ts +0 -8
- package/internal/src/models/GetGameEpicFree200Response.ts +0 -8
- package/internal/src/models/GetGameMinecraftHistoryid200Response.ts +40 -17
- package/internal/src/models/GetGameMinecraftHistoryid200ResponseResultsInner.ts +97 -0
- package/internal/src/models/GetGameMinecraftHistoryid200ResponseResultsInnerHistoryInner.ts +73 -0
- package/internal/src/models/GetGameMinecraftServerstatus200Response.ts +0 -8
- package/internal/src/models/GetGameMinecraftUserinfo200Response.ts +0 -8
- package/internal/src/models/GetGameMinecraftUserinfo502Response.ts +81 -0
- package/internal/src/models/GetGameSteamSummary200Response.ts +0 -8
- package/internal/src/models/GetGithubRepo200Response.ts +15 -0
- package/internal/src/models/GetGithubRepo200ResponseLatestRelease.ts +105 -0
- package/internal/src/models/GetHistoryProgrammer200Response.ts +0 -8
- package/internal/src/models/GetHistoryProgrammerToday200Response.ts +0 -8
- package/internal/src/models/GetImageTobase64200Response.ts +0 -8
- package/internal/src/models/GetMiscDistrict200Response.ts +81 -0
- package/internal/src/models/GetMiscDistrict200ResponseResultsInner.ts +169 -0
- package/internal/src/models/GetMiscDistrict200ResponseResultsInnerCenter.ts +73 -0
- package/internal/src/models/GetMiscDistrict400Response.ts +73 -0
- package/internal/src/models/GetMiscHolidayCalendar200Response.ts +89 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseData.ts +141 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataDaysInner.ts +233 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataHolidaysInner.ts +103 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataNearby.ts +88 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataNearbyNextInner.ts +81 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataNearbyPreviousInner.ts +81 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataQuery.ts +113 -0
- package/internal/src/models/GetMiscHolidayCalendar200ResponseDataSummary.ts +113 -0
- package/internal/src/models/GetMiscHolidayCalendar400Response.ts +73 -0
- package/internal/src/models/GetMiscHotboard200Response.ts +47 -0
- package/internal/src/models/GetMiscHotboard200ResponseListInner.ts +8 -0
- package/internal/src/models/GetMiscHotboard200ResponseResultsInner.ts +81 -0
- package/internal/src/models/GetMiscLunartime200Response.ts +89 -0
- package/internal/src/models/GetMiscLunartime200ResponseData.ts +233 -0
- package/internal/src/models/GetMiscLunartime400Response.ts +73 -0
- package/internal/src/models/GetMiscWeather200Response.ts +198 -26
- package/internal/src/models/GetMiscWeather200ResponseAirPollutants.ts +105 -0
- package/internal/src/models/GetMiscWeather200ResponseForecastInner.ts +193 -0
- package/internal/src/models/GetMiscWeather200ResponseHourlyForecastInner.ts +177 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndices.ts +328 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesAirConditioner.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesAirPurifier.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesAllergy.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesBeer.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesCarWash.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesClothing.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesColdRisk.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesComfort.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesDrying.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesExercise.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesFishing.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesMood.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesPollen.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesSunscreen.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesTraffic.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesTravel.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesUmbrella.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseLifeIndicesUv.ts +81 -0
- package/internal/src/models/GetMiscWeather200ResponseMinutelyPrecip.ts +89 -0
- package/internal/src/models/GetMiscWeather200ResponseMinutelyPrecipDataInner.ts +81 -0
- package/internal/src/models/GetMiscWeather400Response.ts +0 -8
- package/internal/src/models/GetMiscWeather404Response.ts +73 -0
- package/internal/src/models/GetMiscWeather500Response.ts +0 -8
- package/internal/src/models/GetMiscWeather503Response.ts +73 -0
- package/internal/src/models/GetNetworkDns200Response.ts +0 -8
- package/internal/src/models/GetNetworkIpinfo200Response.ts +28 -92
- package/internal/src/models/GetNetworkMyip200Response.ts +137 -0
- package/internal/src/models/GetNetworkPing200Response.ts +0 -8
- package/internal/src/models/GetNetworkPingmyip200Response.ts +0 -8
- package/internal/src/models/GetNetworkPortscan200Response.ts +0 -8
- package/internal/src/models/GetNetworkUrlstatus200Response.ts +38 -43
- package/internal/src/models/GetNetworkUrlstatus200ResponseOneOf.ts +73 -0
- package/internal/src/models/GetNetworkUrlstatus200ResponseOneOf1.ts +73 -0
- package/internal/src/models/GetNetworkWhois200ResponseOneOf.ts +0 -8
- package/internal/src/models/GetNetworkWhois200ResponseOneOf1.ts +0 -8
- package/internal/src/models/GetRandomString200Response.ts +0 -8
- package/internal/src/models/GetSocialQqGroupinfo200Response.ts +88 -0
- package/internal/src/models/GetSocialQqGroupinfo404Response.ts +3 -19
- package/internal/src/models/GetStatusUsage200Response.ts +32 -32
- package/internal/src/models/GetStatusUsage200ResponseAnyOf.ts +88 -0
- package/internal/src/models/GetStatusUsage200ResponseAnyOf1.ts +73 -0
- package/internal/src/models/GetStatusUsage200ResponseAnyOfEndpointsInner.ts +73 -0
- package/internal/src/models/GetStatusUsage200ResponseAnyOfUnaggregated.ts +73 -0
- package/internal/src/models/GetStatusUsage404Response.ts +0 -8
- package/internal/src/models/PostAiTranslate200Response.ts +0 -8
- package/internal/src/models/PostAnswerbookAsk200Response.ts +0 -8
- package/internal/src/models/PostConvertJson200Response.ts +0 -8
- package/internal/src/models/PostImageFrombase64200Response.ts +0 -8
- package/internal/src/models/PostImageNsfw200Response.ts +121 -0
- package/internal/src/models/PostImageNsfw400Response.ts +73 -0
- package/internal/src/models/PostImageNsfw413Response.ts +73 -0
- package/internal/src/models/PostImageNsfw500Response.ts +73 -0
- package/internal/src/models/PostMiscDateDiff200Response.ts +105 -0
- package/internal/src/models/PostMiscDateDiff400Response.ts +81 -0
- package/internal/src/models/PostMiscDateDiffRequest.ts +83 -0
- package/internal/src/models/PostSearchAggregate200Response.ts +1 -1
- package/internal/src/models/PostSearchAggregateRequest.ts +38 -0
- package/internal/src/models/PostSensitiveWordAnalyze200ResponseResultsInner.ts +34 -27
- package/internal/src/models/PostTextAesDecryptAdvanced200Response.ts +65 -0
- package/internal/src/models/PostTextAesDecryptAdvanced400Response.ts +65 -0
- package/internal/src/models/PostTextAesDecryptAdvancedRequest.ts +125 -0
- package/internal/src/models/PostTextAesDecryptRequest.ts +1 -1
- package/internal/src/models/PostTextAesEncryptAdvanced200Response.ts +89 -0
- package/internal/src/models/PostTextAesEncryptAdvanced400Response.ts +65 -0
- package/internal/src/models/PostTextAesEncryptAdvancedRequest.ts +141 -0
- package/internal/src/models/PostTextConvert200Response.ts +97 -0
- package/internal/src/models/PostTextConvert400Response.ts +81 -0
- package/internal/src/models/PostTextConvertRequest.ts +130 -0
- package/internal/src/models/index.ts +71 -8
- package/package.json +5 -3
- package/src/index.ts +302 -78
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
74
|
let path = '/api/v1/api/get';
|
|
74
|
-
return this.c._request('GET', path, params);
|
|
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
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 = {};
|
|
89
|
+
const body = {};
|
|
90
|
+
if (args["compressedData"] !== undefined)
|
|
91
|
+
body["compressedData"] = args["compressedData"];
|
|
92
|
+
if (args["ttl"] !== undefined)
|
|
93
|
+
body["ttl"] = args["ttl"];
|
|
87
94
|
let path = '/api/v1/api/store';
|
|
88
|
-
return this.c._request('POST', path, params);
|
|
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
107
|
let path = '/api/v1/convert/unixtime';
|
|
100
|
-
return this.c._request('GET', path, params);
|
|
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 = {};
|
|
112
|
+
const body = {};
|
|
113
|
+
if (args["content"] !== undefined)
|
|
114
|
+
body["content"] = args["content"];
|
|
104
115
|
let path = '/api/v1/convert/json';
|
|
105
|
-
return this.c._request('POST', path, params);
|
|
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 = {};
|
|
125
|
+
const body = {};
|
|
114
126
|
let path = '/api/v1/daily/news-image';
|
|
115
|
-
return this.c._request('GET', path, params);
|
|
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 = {};
|
|
136
|
+
const body = {};
|
|
124
137
|
let path = '/api/v1/game/epic-free';
|
|
125
|
-
return this.c._request('GET', path, params);
|
|
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
147
|
let path = '/api/v1/game/minecraft/historyid';
|
|
132
|
-
return this.c._request('GET', path, params);
|
|
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
155
|
let path = '/api/v1/game/minecraft/serverstatus';
|
|
139
|
-
return this.c._request('GET', path, params);
|
|
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
163
|
let path = '/api/v1/game/minecraft/userinfo';
|
|
146
|
-
return this.c._request('GET', path, params);
|
|
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)
|
|
@@ -156,7 +175,7 @@ class GameApi {
|
|
|
156
175
|
if (args["key"] !== undefined)
|
|
157
176
|
params["key"] = args["key"];
|
|
158
177
|
let path = '/api/v1/game/steam/summary';
|
|
159
|
-
return this.c._request('GET', path, params);
|
|
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)
|
|
@@ -176,66 +196,105 @@ class ImageApi {
|
|
|
176
196
|
if (args["r"] !== undefined)
|
|
177
197
|
params["r"] = args["r"];
|
|
178
198
|
let path = '/api/v1/avatar/gravatar';
|
|
179
|
-
return this.c._request('GET', path, params);
|
|
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 = {};
|
|
203
|
+
const body = {};
|
|
183
204
|
let path = '/api/v1/image/bing-daily';
|
|
184
|
-
return this.c._request('GET', path, params);
|
|
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
214
|
let path = '/api/v1/image/motou';
|
|
193
|
-
return this.c._request('GET', path, params);
|
|
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"];
|
|
226
|
+
if (args["transparent"] !== undefined)
|
|
227
|
+
params["transparent"] = args["transparent"];
|
|
228
|
+
if (args["fgcolor"] !== undefined)
|
|
229
|
+
params["fgcolor"] = args["fgcolor"];
|
|
230
|
+
if (args["bgcolor"] !== undefined)
|
|
231
|
+
params["bgcolor"] = args["bgcolor"];
|
|
203
232
|
let path = '/api/v1/image/qrcode';
|
|
204
|
-
return this.c._request('GET', path, params);
|
|
233
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
205
234
|
}
|
|
206
235
|
async getImageTobase64(args = {}) {
|
|
207
236
|
const params = {};
|
|
237
|
+
const body = {};
|
|
208
238
|
if (args["url"] !== undefined)
|
|
209
239
|
params["url"] = args["url"];
|
|
210
240
|
let path = '/api/v1/image/tobase64';
|
|
211
|
-
return this.c._request('GET', path, params);
|
|
241
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
212
242
|
}
|
|
213
243
|
async postImageCompress(args = {}) {
|
|
214
244
|
const params = {};
|
|
245
|
+
const body = {};
|
|
215
246
|
if (args["level"] !== undefined)
|
|
216
247
|
params["level"] = args["level"];
|
|
217
248
|
if (args["format"] !== undefined)
|
|
218
249
|
params["format"] = args["format"];
|
|
250
|
+
if (args["file"] !== undefined)
|
|
251
|
+
body["file"] = args["file"];
|
|
219
252
|
let path = '/api/v1/image/compress';
|
|
220
|
-
return this.c._request('POST', path, params);
|
|
253
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
221
254
|
}
|
|
222
255
|
async postImageFrombase64(args = {}) {
|
|
223
256
|
const params = {};
|
|
257
|
+
const body = {};
|
|
258
|
+
if (args["imageData"] !== undefined)
|
|
259
|
+
body["imageData"] = args["imageData"];
|
|
224
260
|
let path = '/api/v1/image/frombase64';
|
|
225
|
-
return this.c._request('POST', path, params);
|
|
261
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
226
262
|
}
|
|
227
263
|
async postImageMotou(args = {}) {
|
|
228
264
|
const params = {};
|
|
265
|
+
const body = {};
|
|
266
|
+
if (args["bg_color"] !== undefined)
|
|
267
|
+
body["bg_color"] = args["bg_color"];
|
|
268
|
+
if (args["file"] !== undefined)
|
|
269
|
+
body["file"] = args["file"];
|
|
270
|
+
if (args["image_url"] !== undefined)
|
|
271
|
+
body["image_url"] = args["image_url"];
|
|
229
272
|
let path = '/api/v1/image/motou';
|
|
230
|
-
return this.c._request('POST', path, params);
|
|
273
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
274
|
+
}
|
|
275
|
+
async postImageNsfw(args = {}) {
|
|
276
|
+
const params = {};
|
|
277
|
+
const body = {};
|
|
278
|
+
if (args["file"] !== undefined)
|
|
279
|
+
body["file"] = args["file"];
|
|
280
|
+
if (args["url"] !== undefined)
|
|
281
|
+
body["url"] = args["url"];
|
|
282
|
+
let path = '/api/v1/image/nsfw';
|
|
283
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
231
284
|
}
|
|
232
285
|
async postImageSpeechless(args = {}) {
|
|
233
286
|
const params = {};
|
|
287
|
+
const body = {};
|
|
288
|
+
if (args["bottom_text"] !== undefined)
|
|
289
|
+
body["bottom_text"] = args["bottom_text"];
|
|
290
|
+
if (args["top_text"] !== undefined)
|
|
291
|
+
body["top_text"] = args["top_text"];
|
|
234
292
|
let path = '/api/v1/image/speechless';
|
|
235
|
-
return this.c._request('POST', path, params);
|
|
293
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
236
294
|
}
|
|
237
295
|
async postImageSvg(args = {}) {
|
|
238
296
|
const params = {};
|
|
297
|
+
const body = {};
|
|
239
298
|
if (args["format"] !== undefined)
|
|
240
299
|
params["format"] = args["format"];
|
|
241
300
|
if (args["width"] !== undefined)
|
|
@@ -244,8 +303,10 @@ class ImageApi {
|
|
|
244
303
|
params["height"] = args["height"];
|
|
245
304
|
if (args["quality"] !== undefined)
|
|
246
305
|
params["quality"] = args["quality"];
|
|
306
|
+
if (args["file"] !== undefined)
|
|
307
|
+
body["file"] = args["file"];
|
|
247
308
|
let path = '/api/v1/image/svg';
|
|
248
|
-
return this.c._request('POST', path, params);
|
|
309
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
249
310
|
}
|
|
250
311
|
}
|
|
251
312
|
class MiscApi {
|
|
@@ -254,34 +315,101 @@ class MiscApi {
|
|
|
254
315
|
}
|
|
255
316
|
async getHistoryProgrammer(args = {}) {
|
|
256
317
|
const params = {};
|
|
318
|
+
const body = {};
|
|
257
319
|
if (args["month"] !== undefined)
|
|
258
320
|
params["month"] = args["month"];
|
|
259
321
|
if (args["day"] !== undefined)
|
|
260
322
|
params["day"] = args["day"];
|
|
261
323
|
let path = '/api/v1/history/programmer';
|
|
262
|
-
return this.c._request('GET', path, params);
|
|
324
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
263
325
|
}
|
|
264
326
|
async getHistoryProgrammerToday(args = {}) {
|
|
265
327
|
const params = {};
|
|
328
|
+
const body = {};
|
|
266
329
|
let path = '/api/v1/history/programmer/today';
|
|
267
|
-
return this.c._request('GET', path, params);
|
|
330
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
331
|
+
}
|
|
332
|
+
async getMiscDistrict(args = {}) {
|
|
333
|
+
const params = {};
|
|
334
|
+
const body = {};
|
|
335
|
+
if (args["keywords"] !== undefined)
|
|
336
|
+
params["keywords"] = args["keywords"];
|
|
337
|
+
if (args["adcode"] !== undefined)
|
|
338
|
+
params["adcode"] = args["adcode"];
|
|
339
|
+
if (args["lat"] !== undefined)
|
|
340
|
+
params["lat"] = args["lat"];
|
|
341
|
+
if (args["lng"] !== undefined)
|
|
342
|
+
params["lng"] = args["lng"];
|
|
343
|
+
if (args["level"] !== undefined)
|
|
344
|
+
params["level"] = args["level"];
|
|
345
|
+
if (args["country"] !== undefined)
|
|
346
|
+
params["country"] = args["country"];
|
|
347
|
+
if (args["limit"] !== undefined)
|
|
348
|
+
params["limit"] = args["limit"];
|
|
349
|
+
let path = '/api/v1/misc/district';
|
|
350
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
351
|
+
}
|
|
352
|
+
async getMiscHolidayCalendar(args = {}) {
|
|
353
|
+
const params = {};
|
|
354
|
+
const body = {};
|
|
355
|
+
if (args["date"] !== undefined)
|
|
356
|
+
params["date"] = args["date"];
|
|
357
|
+
if (args["month"] !== undefined)
|
|
358
|
+
params["month"] = args["month"];
|
|
359
|
+
if (args["year"] !== undefined)
|
|
360
|
+
params["year"] = args["year"];
|
|
361
|
+
if (args["timezone"] !== undefined)
|
|
362
|
+
params["timezone"] = args["timezone"];
|
|
363
|
+
if (args["holiday_type"] !== undefined)
|
|
364
|
+
params["holiday_type"] = args["holiday_type"];
|
|
365
|
+
if (args["include_nearby"] !== undefined)
|
|
366
|
+
params["include_nearby"] = args["include_nearby"];
|
|
367
|
+
if (args["nearby_limit"] !== undefined)
|
|
368
|
+
params["nearby_limit"] = args["nearby_limit"];
|
|
369
|
+
let path = '/api/v1/misc/holiday-calendar';
|
|
370
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
268
371
|
}
|
|
269
372
|
async getMiscHotboard(args = {}) {
|
|
270
373
|
const params = {};
|
|
374
|
+
const body = {};
|
|
271
375
|
if (args["type"] !== undefined)
|
|
272
376
|
params["type"] = args["type"];
|
|
377
|
+
if (args["time"] !== undefined)
|
|
378
|
+
params["time"] = args["time"];
|
|
379
|
+
if (args["keyword"] !== undefined)
|
|
380
|
+
params["keyword"] = args["keyword"];
|
|
381
|
+
if (args["time_start"] !== undefined)
|
|
382
|
+
params["time_start"] = args["time_start"];
|
|
383
|
+
if (args["time_end"] !== undefined)
|
|
384
|
+
params["time_end"] = args["time_end"];
|
|
385
|
+
if (args["limit"] !== undefined)
|
|
386
|
+
params["limit"] = args["limit"];
|
|
387
|
+
if (args["sources"] !== undefined)
|
|
388
|
+
params["sources"] = args["sources"];
|
|
273
389
|
let path = '/api/v1/misc/hotboard';
|
|
274
|
-
return this.c._request('GET', path, params);
|
|
390
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
391
|
+
}
|
|
392
|
+
async getMiscLunartime(args = {}) {
|
|
393
|
+
const params = {};
|
|
394
|
+
const body = {};
|
|
395
|
+
if (args["ts"] !== undefined)
|
|
396
|
+
params["ts"] = args["ts"];
|
|
397
|
+
if (args["timezone"] !== undefined)
|
|
398
|
+
params["timezone"] = args["timezone"];
|
|
399
|
+
let path = '/api/v1/misc/lunartime';
|
|
400
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
275
401
|
}
|
|
276
402
|
async getMiscPhoneinfo(args = {}) {
|
|
277
403
|
const params = {};
|
|
404
|
+
const body = {};
|
|
278
405
|
if (args["phone"] !== undefined)
|
|
279
406
|
params["phone"] = args["phone"];
|
|
280
407
|
let path = '/api/v1/misc/phoneinfo';
|
|
281
|
-
return this.c._request('GET', path, params);
|
|
408
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
282
409
|
}
|
|
283
410
|
async getMiscRandomnumber(args = {}) {
|
|
284
411
|
const params = {};
|
|
412
|
+
const body = {};
|
|
285
413
|
if (args["min"] !== undefined)
|
|
286
414
|
params["min"] = args["min"];
|
|
287
415
|
if (args["max"] !== undefined)
|
|
@@ -295,51 +423,83 @@ class MiscApi {
|
|
|
295
423
|
if (args["decimal_places"] !== undefined)
|
|
296
424
|
params["decimal_places"] = args["decimal_places"];
|
|
297
425
|
let path = '/api/v1/misc/randomnumber';
|
|
298
|
-
return this.c._request('GET', path, params);
|
|
426
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
299
427
|
}
|
|
300
428
|
async getMiscTimestamp(args = {}) {
|
|
301
429
|
const params = {};
|
|
430
|
+
const body = {};
|
|
302
431
|
if (args["ts"] !== undefined)
|
|
303
432
|
params["ts"] = args["ts"];
|
|
304
433
|
let path = '/api/v1/misc/timestamp';
|
|
305
|
-
return this.c._request('GET', path, params);
|
|
434
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
306
435
|
}
|
|
307
436
|
async getMiscTrackingCarriers(args = {}) {
|
|
308
437
|
const params = {};
|
|
438
|
+
const body = {};
|
|
309
439
|
let path = '/api/v1/misc/tracking/carriers';
|
|
310
|
-
return this.c._request('GET', path, params);
|
|
440
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
311
441
|
}
|
|
312
442
|
async getMiscTrackingDetect(args = {}) {
|
|
313
443
|
const params = {};
|
|
444
|
+
const body = {};
|
|
314
445
|
if (args["tracking_number"] !== undefined)
|
|
315
446
|
params["tracking_number"] = args["tracking_number"];
|
|
316
447
|
let path = '/api/v1/misc/tracking/detect';
|
|
317
|
-
return this.c._request('GET', path, params);
|
|
448
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
318
449
|
}
|
|
319
450
|
async getMiscTrackingQuery(args = {}) {
|
|
320
451
|
const params = {};
|
|
452
|
+
const body = {};
|
|
321
453
|
if (args["tracking_number"] !== undefined)
|
|
322
454
|
params["tracking_number"] = args["tracking_number"];
|
|
323
455
|
if (args["carrier_code"] !== undefined)
|
|
324
456
|
params["carrier_code"] = args["carrier_code"];
|
|
457
|
+
if (args["phone"] !== undefined)
|
|
458
|
+
params["phone"] = args["phone"];
|
|
325
459
|
let path = '/api/v1/misc/tracking/query';
|
|
326
|
-
return this.c._request('GET', path, params);
|
|
460
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
327
461
|
}
|
|
328
462
|
async getMiscWeather(args = {}) {
|
|
329
463
|
const params = {};
|
|
464
|
+
const body = {};
|
|
330
465
|
if (args["city"] !== undefined)
|
|
331
466
|
params["city"] = args["city"];
|
|
332
467
|
if (args["adcode"] !== undefined)
|
|
333
468
|
params["adcode"] = args["adcode"];
|
|
469
|
+
if (args["extended"] !== undefined)
|
|
470
|
+
params["extended"] = args["extended"];
|
|
471
|
+
if (args["forecast"] !== undefined)
|
|
472
|
+
params["forecast"] = args["forecast"];
|
|
473
|
+
if (args["hourly"] !== undefined)
|
|
474
|
+
params["hourly"] = args["hourly"];
|
|
475
|
+
if (args["minutely"] !== undefined)
|
|
476
|
+
params["minutely"] = args["minutely"];
|
|
477
|
+
if (args["indices"] !== undefined)
|
|
478
|
+
params["indices"] = args["indices"];
|
|
479
|
+
if (args["lang"] !== undefined)
|
|
480
|
+
params["lang"] = args["lang"];
|
|
334
481
|
let path = '/api/v1/misc/weather';
|
|
335
|
-
return this.c._request('GET', path, params);
|
|
482
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
336
483
|
}
|
|
337
484
|
async getMiscWorldtime(args = {}) {
|
|
338
485
|
const params = {};
|
|
486
|
+
const body = {};
|
|
339
487
|
if (args["city"] !== undefined)
|
|
340
488
|
params["city"] = args["city"];
|
|
341
489
|
let path = '/api/v1/misc/worldtime';
|
|
342
|
-
return this.c._request('GET', path, params);
|
|
490
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
491
|
+
}
|
|
492
|
+
async postMiscDateDiff(args = {}) {
|
|
493
|
+
const params = {};
|
|
494
|
+
const body = {};
|
|
495
|
+
if (args["end_date"] !== undefined)
|
|
496
|
+
body["end_date"] = args["end_date"];
|
|
497
|
+
if (args["format"] !== undefined)
|
|
498
|
+
body["format"] = args["format"];
|
|
499
|
+
if (args["start_date"] !== undefined)
|
|
500
|
+
body["start_date"] = args["start_date"];
|
|
501
|
+
let path = '/api/v1/misc/date-diff';
|
|
502
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
343
503
|
}
|
|
344
504
|
}
|
|
345
505
|
class NetworkApi {
|
|
@@ -348,50 +508,57 @@ class NetworkApi {
|
|
|
348
508
|
}
|
|
349
509
|
async getNetworkDns(args = {}) {
|
|
350
510
|
const params = {};
|
|
511
|
+
const body = {};
|
|
351
512
|
if (args["domain"] !== undefined)
|
|
352
513
|
params["domain"] = args["domain"];
|
|
353
514
|
if (args["type"] !== undefined)
|
|
354
515
|
params["type"] = args["type"];
|
|
355
516
|
let path = '/api/v1/network/dns';
|
|
356
|
-
return this.c._request('GET', path, params);
|
|
517
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
357
518
|
}
|
|
358
519
|
async getNetworkIcp(args = {}) {
|
|
359
520
|
const params = {};
|
|
521
|
+
const body = {};
|
|
360
522
|
if (args["domain"] !== undefined)
|
|
361
523
|
params["domain"] = args["domain"];
|
|
362
524
|
let path = '/api/v1/network/icp';
|
|
363
|
-
return this.c._request('GET', path, params);
|
|
525
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
364
526
|
}
|
|
365
527
|
async getNetworkIpinfo(args = {}) {
|
|
366
528
|
const params = {};
|
|
529
|
+
const body = {};
|
|
367
530
|
if (args["ip"] !== undefined)
|
|
368
531
|
params["ip"] = args["ip"];
|
|
369
532
|
if (args["source"] !== undefined)
|
|
370
533
|
params["source"] = args["source"];
|
|
371
534
|
let path = '/api/v1/network/ipinfo';
|
|
372
|
-
return this.c._request('GET', path, params);
|
|
535
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
373
536
|
}
|
|
374
537
|
async getNetworkMyip(args = {}) {
|
|
375
538
|
const params = {};
|
|
539
|
+
const body = {};
|
|
376
540
|
if (args["source"] !== undefined)
|
|
377
541
|
params["source"] = args["source"];
|
|
378
542
|
let path = '/api/v1/network/myip';
|
|
379
|
-
return this.c._request('GET', path, params);
|
|
543
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
380
544
|
}
|
|
381
545
|
async getNetworkPing(args = {}) {
|
|
382
546
|
const params = {};
|
|
547
|
+
const body = {};
|
|
383
548
|
if (args["host"] !== undefined)
|
|
384
549
|
params["host"] = args["host"];
|
|
385
550
|
let path = '/api/v1/network/ping';
|
|
386
|
-
return this.c._request('GET', path, params);
|
|
551
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
387
552
|
}
|
|
388
553
|
async getNetworkPingmyip(args = {}) {
|
|
389
554
|
const params = {};
|
|
555
|
+
const body = {};
|
|
390
556
|
let path = '/api/v1/network/pingmyip';
|
|
391
|
-
return this.c._request('GET', path, params);
|
|
557
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
392
558
|
}
|
|
393
559
|
async getNetworkPortscan(args = {}) {
|
|
394
560
|
const params = {};
|
|
561
|
+
const body = {};
|
|
395
562
|
if (args["host"] !== undefined)
|
|
396
563
|
params["host"] = args["host"];
|
|
397
564
|
if (args["port"] !== undefined)
|
|
@@ -399,30 +566,33 @@ class NetworkApi {
|
|
|
399
566
|
if (args["protocol"] !== undefined)
|
|
400
567
|
params["protocol"] = args["protocol"];
|
|
401
568
|
let path = '/api/v1/network/portscan';
|
|
402
|
-
return this.c._request('GET', path, params);
|
|
569
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
403
570
|
}
|
|
404
571
|
async getNetworkUrlstatus(args = {}) {
|
|
405
572
|
const params = {};
|
|
573
|
+
const body = {};
|
|
406
574
|
if (args["url"] !== undefined)
|
|
407
575
|
params["url"] = args["url"];
|
|
408
576
|
let path = '/api/v1/network/urlstatus';
|
|
409
|
-
return this.c._request('GET', path, params);
|
|
577
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
410
578
|
}
|
|
411
579
|
async getNetworkWhois(args = {}) {
|
|
412
580
|
const params = {};
|
|
581
|
+
const body = {};
|
|
413
582
|
if (args["domain"] !== undefined)
|
|
414
583
|
params["domain"] = args["domain"];
|
|
415
584
|
if (args["format"] !== undefined)
|
|
416
585
|
params["format"] = args["format"];
|
|
417
586
|
let path = '/api/v1/network/whois';
|
|
418
|
-
return this.c._request('GET', path, params);
|
|
587
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
419
588
|
}
|
|
420
589
|
async getNetworkWxdomain(args = {}) {
|
|
421
590
|
const params = {};
|
|
591
|
+
const body = {};
|
|
422
592
|
if (args["domain"] !== undefined)
|
|
423
593
|
params["domain"] = args["domain"];
|
|
424
594
|
let path = '/api/v1/network/wxdomain';
|
|
425
|
-
return this.c._request('GET', path, params);
|
|
595
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
426
596
|
}
|
|
427
597
|
}
|
|
428
598
|
class PoemApi {
|
|
@@ -431,8 +601,9 @@ class PoemApi {
|
|
|
431
601
|
}
|
|
432
602
|
async getSaying(args = {}) {
|
|
433
603
|
const params = {};
|
|
604
|
+
const body = {};
|
|
434
605
|
let path = '/api/v1/saying';
|
|
435
|
-
return this.c._request('GET', path, params);
|
|
606
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
436
607
|
}
|
|
437
608
|
}
|
|
438
609
|
class RandomApi {
|
|
@@ -441,33 +612,39 @@ class RandomApi {
|
|
|
441
612
|
}
|
|
442
613
|
async getAnswerbookAsk(args = {}) {
|
|
443
614
|
const params = {};
|
|
615
|
+
const body = {};
|
|
444
616
|
if (args["question"] !== undefined)
|
|
445
617
|
params["question"] = args["question"];
|
|
446
618
|
let path = '/api/v1/answerbook/ask';
|
|
447
|
-
return this.c._request('GET', path, params);
|
|
619
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
448
620
|
}
|
|
449
621
|
async getRandomImage(args = {}) {
|
|
450
622
|
const params = {};
|
|
623
|
+
const body = {};
|
|
451
624
|
if (args["category"] !== undefined)
|
|
452
625
|
params["category"] = args["category"];
|
|
453
626
|
if (args["type"] !== undefined)
|
|
454
627
|
params["type"] = args["type"];
|
|
455
628
|
let path = '/api/v1/random/image';
|
|
456
|
-
return this.c._request('GET', path, params);
|
|
629
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
457
630
|
}
|
|
458
631
|
async getRandomString(args = {}) {
|
|
459
632
|
const params = {};
|
|
633
|
+
const body = {};
|
|
460
634
|
if (args["length"] !== undefined)
|
|
461
635
|
params["length"] = args["length"];
|
|
462
636
|
if (args["type"] !== undefined)
|
|
463
637
|
params["type"] = args["type"];
|
|
464
638
|
let path = '/api/v1/random/string';
|
|
465
|
-
return this.c._request('GET', path, params);
|
|
639
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
466
640
|
}
|
|
467
641
|
async postAnswerbookAsk(args = {}) {
|
|
468
642
|
const params = {};
|
|
643
|
+
const body = {};
|
|
644
|
+
if (args["question"] !== undefined)
|
|
645
|
+
body["question"] = args["question"];
|
|
469
646
|
let path = '/api/v1/answerbook/ask';
|
|
470
|
-
return this.c._request('POST', path, params);
|
|
647
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
471
648
|
}
|
|
472
649
|
}
|
|
473
650
|
class SocialApi {
|
|
@@ -476,13 +653,15 @@ class SocialApi {
|
|
|
476
653
|
}
|
|
477
654
|
async getGithubRepo(args = {}) {
|
|
478
655
|
const params = {};
|
|
656
|
+
const body = {};
|
|
479
657
|
if (args["repo"] !== undefined)
|
|
480
658
|
params["repo"] = args["repo"];
|
|
481
659
|
let path = '/api/v1/github/repo';
|
|
482
|
-
return this.c._request('GET', path, params);
|
|
660
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
483
661
|
}
|
|
484
662
|
async getSocialBilibiliArchives(args = {}) {
|
|
485
663
|
const params = {};
|
|
664
|
+
const body = {};
|
|
486
665
|
if (args["mid"] !== undefined)
|
|
487
666
|
params["mid"] = args["mid"];
|
|
488
667
|
if (args["keywords"] !== undefined)
|
|
@@ -494,19 +673,21 @@ class SocialApi {
|
|
|
494
673
|
if (args["pn"] !== undefined)
|
|
495
674
|
params["pn"] = args["pn"];
|
|
496
675
|
let path = '/api/v1/social/bilibili/archives';
|
|
497
|
-
return this.c._request('GET', path, params);
|
|
676
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
498
677
|
}
|
|
499
678
|
async getSocialBilibiliLiveroom(args = {}) {
|
|
500
679
|
const params = {};
|
|
680
|
+
const body = {};
|
|
501
681
|
if (args["mid"] !== undefined)
|
|
502
682
|
params["mid"] = args["mid"];
|
|
503
683
|
if (args["room_id"] !== undefined)
|
|
504
684
|
params["room_id"] = args["room_id"];
|
|
505
685
|
let path = '/api/v1/social/bilibili/liveroom';
|
|
506
|
-
return this.c._request('GET', path, params);
|
|
686
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
507
687
|
}
|
|
508
688
|
async getSocialBilibiliReplies(args = {}) {
|
|
509
689
|
const params = {};
|
|
690
|
+
const body = {};
|
|
510
691
|
if (args["oid"] !== undefined)
|
|
511
692
|
params["oid"] = args["oid"];
|
|
512
693
|
if (args["sort"] !== undefined)
|
|
@@ -516,37 +697,41 @@ class SocialApi {
|
|
|
516
697
|
if (args["pn"] !== undefined)
|
|
517
698
|
params["pn"] = args["pn"];
|
|
518
699
|
let path = '/api/v1/social/bilibili/replies';
|
|
519
|
-
return this.c._request('GET', path, params);
|
|
700
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
520
701
|
}
|
|
521
702
|
async getSocialBilibiliUserinfo(args = {}) {
|
|
522
703
|
const params = {};
|
|
704
|
+
const body = {};
|
|
523
705
|
if (args["uid"] !== undefined)
|
|
524
706
|
params["uid"] = args["uid"];
|
|
525
707
|
let path = '/api/v1/social/bilibili/userinfo';
|
|
526
|
-
return this.c._request('GET', path, params);
|
|
708
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
527
709
|
}
|
|
528
710
|
async getSocialBilibiliVideoinfo(args = {}) {
|
|
529
711
|
const params = {};
|
|
712
|
+
const body = {};
|
|
530
713
|
if (args["aid"] !== undefined)
|
|
531
714
|
params["aid"] = args["aid"];
|
|
532
715
|
if (args["bvid"] !== undefined)
|
|
533
716
|
params["bvid"] = args["bvid"];
|
|
534
717
|
let path = '/api/v1/social/bilibili/videoinfo';
|
|
535
|
-
return this.c._request('GET', path, params);
|
|
718
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
536
719
|
}
|
|
537
720
|
async getSocialQqGroupinfo(args = {}) {
|
|
538
721
|
const params = {};
|
|
722
|
+
const body = {};
|
|
539
723
|
if (args["group_id"] !== undefined)
|
|
540
724
|
params["group_id"] = args["group_id"];
|
|
541
725
|
let path = '/api/v1/social/qq/groupinfo';
|
|
542
|
-
return this.c._request('GET', path, params);
|
|
726
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
543
727
|
}
|
|
544
728
|
async getSocialQqUserinfo(args = {}) {
|
|
545
729
|
const params = {};
|
|
730
|
+
const body = {};
|
|
546
731
|
if (args["qq"] !== undefined)
|
|
547
732
|
params["qq"] = args["qq"];
|
|
548
733
|
let path = '/api/v1/social/qq/userinfo';
|
|
549
|
-
return this.c._request('GET', path, params);
|
|
734
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
550
735
|
}
|
|
551
736
|
}
|
|
552
737
|
class StatusApi {
|
|
@@ -555,15 +740,17 @@ class StatusApi {
|
|
|
555
740
|
}
|
|
556
741
|
async getStatusRatelimit(args = {}) {
|
|
557
742
|
const params = {};
|
|
743
|
+
const body = {};
|
|
558
744
|
let path = '/api/v1/status/ratelimit';
|
|
559
|
-
return this.c._request('GET', path, params);
|
|
745
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
560
746
|
}
|
|
561
747
|
async getStatusUsage(args = {}) {
|
|
562
748
|
const params = {};
|
|
749
|
+
const body = {};
|
|
563
750
|
if (args["path"] !== undefined)
|
|
564
751
|
params["path"] = args["path"];
|
|
565
752
|
let path = '/api/v1/status/usage';
|
|
566
|
-
return this.c._request('GET', path, params);
|
|
753
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
567
754
|
}
|
|
568
755
|
}
|
|
569
756
|
class TextApi {
|
|
@@ -572,45 +759,123 @@ class TextApi {
|
|
|
572
759
|
}
|
|
573
760
|
async getTextMd5(args = {}) {
|
|
574
761
|
const params = {};
|
|
762
|
+
const body = {};
|
|
575
763
|
if (args["text"] !== undefined)
|
|
576
764
|
params["text"] = args["text"];
|
|
577
765
|
let path = '/api/v1/text/md5';
|
|
578
|
-
return this.c._request('GET', path, params);
|
|
766
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
579
767
|
}
|
|
580
768
|
async postTextAesDecrypt(args = {}) {
|
|
581
769
|
const params = {};
|
|
770
|
+
const body = {};
|
|
771
|
+
if (args["key"] !== undefined)
|
|
772
|
+
body["key"] = args["key"];
|
|
773
|
+
if (args["nonce"] !== undefined)
|
|
774
|
+
body["nonce"] = args["nonce"];
|
|
775
|
+
if (args["text"] !== undefined)
|
|
776
|
+
body["text"] = args["text"];
|
|
582
777
|
let path = '/api/v1/text/aes/decrypt';
|
|
583
|
-
return this.c._request('POST', path, params);
|
|
778
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
779
|
+
}
|
|
780
|
+
async postTextAesDecryptAdvanced(args = {}) {
|
|
781
|
+
const params = {};
|
|
782
|
+
const body = {};
|
|
783
|
+
if (args["iv"] !== undefined)
|
|
784
|
+
body["iv"] = args["iv"];
|
|
785
|
+
if (args["key"] !== undefined)
|
|
786
|
+
body["key"] = args["key"];
|
|
787
|
+
if (args["mode"] !== undefined)
|
|
788
|
+
body["mode"] = args["mode"];
|
|
789
|
+
if (args["padding"] !== undefined)
|
|
790
|
+
body["padding"] = args["padding"];
|
|
791
|
+
if (args["text"] !== undefined)
|
|
792
|
+
body["text"] = args["text"];
|
|
793
|
+
let path = '/api/v1/text/aes/decrypt-advanced';
|
|
794
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
584
795
|
}
|
|
585
796
|
async postTextAesEncrypt(args = {}) {
|
|
586
797
|
const params = {};
|
|
798
|
+
const body = {};
|
|
799
|
+
if (args["key"] !== undefined)
|
|
800
|
+
body["key"] = args["key"];
|
|
801
|
+
if (args["text"] !== undefined)
|
|
802
|
+
body["text"] = args["text"];
|
|
587
803
|
let path = '/api/v1/text/aes/encrypt';
|
|
588
|
-
return this.c._request('POST', path, params);
|
|
804
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
805
|
+
}
|
|
806
|
+
async postTextAesEncryptAdvanced(args = {}) {
|
|
807
|
+
const params = {};
|
|
808
|
+
const body = {};
|
|
809
|
+
if (args["iv"] !== undefined)
|
|
810
|
+
body["iv"] = args["iv"];
|
|
811
|
+
if (args["key"] !== undefined)
|
|
812
|
+
body["key"] = args["key"];
|
|
813
|
+
if (args["mode"] !== undefined)
|
|
814
|
+
body["mode"] = args["mode"];
|
|
815
|
+
if (args["output_format"] !== undefined)
|
|
816
|
+
body["output_format"] = args["output_format"];
|
|
817
|
+
if (args["padding"] !== undefined)
|
|
818
|
+
body["padding"] = args["padding"];
|
|
819
|
+
if (args["text"] !== undefined)
|
|
820
|
+
body["text"] = args["text"];
|
|
821
|
+
let path = '/api/v1/text/aes/encrypt-advanced';
|
|
822
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
589
823
|
}
|
|
590
824
|
async postTextAnalyze(args = {}) {
|
|
591
825
|
const params = {};
|
|
826
|
+
const body = {};
|
|
827
|
+
if (args["text"] !== undefined)
|
|
828
|
+
body["text"] = args["text"];
|
|
592
829
|
let path = '/api/v1/text/analyze';
|
|
593
|
-
return this.c._request('POST', path, params);
|
|
830
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
594
831
|
}
|
|
595
832
|
async postTextBase64Decode(args = {}) {
|
|
596
833
|
const params = {};
|
|
834
|
+
const body = {};
|
|
835
|
+
if (args["text"] !== undefined)
|
|
836
|
+
body["text"] = args["text"];
|
|
597
837
|
let path = '/api/v1/text/base64/decode';
|
|
598
|
-
return this.c._request('POST', path, params);
|
|
838
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
599
839
|
}
|
|
600
840
|
async postTextBase64Encode(args = {}) {
|
|
601
841
|
const params = {};
|
|
842
|
+
const body = {};
|
|
843
|
+
if (args["text"] !== undefined)
|
|
844
|
+
body["text"] = args["text"];
|
|
602
845
|
let path = '/api/v1/text/base64/encode';
|
|
603
|
-
return this.c._request('POST', path, params);
|
|
846
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
847
|
+
}
|
|
848
|
+
async postTextConvert(args = {}) {
|
|
849
|
+
const params = {};
|
|
850
|
+
const body = {};
|
|
851
|
+
if (args["from"] !== undefined)
|
|
852
|
+
body["from"] = args["from"];
|
|
853
|
+
if (args["options"] !== undefined)
|
|
854
|
+
body["options"] = args["options"];
|
|
855
|
+
if (args["text"] !== undefined)
|
|
856
|
+
body["text"] = args["text"];
|
|
857
|
+
if (args["to"] !== undefined)
|
|
858
|
+
body["to"] = args["to"];
|
|
859
|
+
let path = '/api/v1/text/convert';
|
|
860
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
604
861
|
}
|
|
605
862
|
async postTextMd5(args = {}) {
|
|
606
863
|
const params = {};
|
|
864
|
+
const body = {};
|
|
865
|
+
if (args["text"] !== undefined)
|
|
866
|
+
body["text"] = args["text"];
|
|
607
867
|
let path = '/api/v1/text/md5';
|
|
608
|
-
return this.c._request('POST', path, params);
|
|
868
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
609
869
|
}
|
|
610
870
|
async postTextMd5Verify(args = {}) {
|
|
611
871
|
const params = {};
|
|
872
|
+
const body = {};
|
|
873
|
+
if (args["hash"] !== undefined)
|
|
874
|
+
body["hash"] = args["hash"];
|
|
875
|
+
if (args["text"] !== undefined)
|
|
876
|
+
body["text"] = args["text"];
|
|
612
877
|
let path = '/api/v1/text/md5/verify';
|
|
613
|
-
return this.c._request('POST', path, params);
|
|
878
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
614
879
|
}
|
|
615
880
|
}
|
|
616
881
|
class TranslateApi {
|
|
@@ -619,27 +884,57 @@ class TranslateApi {
|
|
|
619
884
|
}
|
|
620
885
|
async getAiTranslateLanguages(args = {}) {
|
|
621
886
|
const params = {};
|
|
887
|
+
const body = {};
|
|
622
888
|
let path = '/api/v1/ai/translate/languages';
|
|
623
|
-
return this.c._request('GET', path, params);
|
|
889
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
624
890
|
}
|
|
625
891
|
async postAiTranslate(args = {}) {
|
|
626
892
|
const params = {};
|
|
893
|
+
const body = {};
|
|
627
894
|
if (args["target_lang"] !== undefined)
|
|
628
895
|
params["target_lang"] = args["target_lang"];
|
|
896
|
+
if (args["context"] !== undefined)
|
|
897
|
+
body["context"] = args["context"];
|
|
898
|
+
if (args["fast_mode"] !== undefined)
|
|
899
|
+
body["fast_mode"] = args["fast_mode"];
|
|
900
|
+
if (args["max_concurrency"] !== undefined)
|
|
901
|
+
body["max_concurrency"] = args["max_concurrency"];
|
|
902
|
+
if (args["preserve_format"] !== undefined)
|
|
903
|
+
body["preserve_format"] = args["preserve_format"];
|
|
904
|
+
if (args["source_lang"] !== undefined)
|
|
905
|
+
body["source_lang"] = args["source_lang"];
|
|
906
|
+
if (args["style"] !== undefined)
|
|
907
|
+
body["style"] = args["style"];
|
|
908
|
+
if (args["text"] !== undefined)
|
|
909
|
+
body["text"] = args["text"];
|
|
910
|
+
if (args["texts"] !== undefined)
|
|
911
|
+
body["texts"] = args["texts"];
|
|
629
912
|
let path = '/api/v1/ai/translate';
|
|
630
|
-
return this.c._request('POST', path, params);
|
|
913
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
631
914
|
}
|
|
632
915
|
async postTranslateStream(args = {}) {
|
|
633
916
|
const params = {};
|
|
917
|
+
const body = {};
|
|
918
|
+
if (args["from_lang"] !== undefined)
|
|
919
|
+
body["from_lang"] = args["from_lang"];
|
|
920
|
+
if (args["query"] !== undefined)
|
|
921
|
+
body["query"] = args["query"];
|
|
922
|
+
if (args["to_lang"] !== undefined)
|
|
923
|
+
body["to_lang"] = args["to_lang"];
|
|
924
|
+
if (args["tone"] !== undefined)
|
|
925
|
+
body["tone"] = args["tone"];
|
|
634
926
|
let path = '/api/v1/translate/stream';
|
|
635
|
-
return this.c._request('POST', path, params);
|
|
927
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
636
928
|
}
|
|
637
929
|
async postTranslateText(args = {}) {
|
|
638
930
|
const params = {};
|
|
931
|
+
const body = {};
|
|
639
932
|
if (args["to_lang"] !== undefined)
|
|
640
933
|
params["to_lang"] = args["to_lang"];
|
|
934
|
+
if (args["text"] !== undefined)
|
|
935
|
+
body["text"] = args["text"];
|
|
641
936
|
let path = '/api/v1/translate/text';
|
|
642
|
-
return this.c._request('POST', path, params);
|
|
937
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
643
938
|
}
|
|
644
939
|
}
|
|
645
940
|
class WebparseApi {
|
|
@@ -648,31 +943,35 @@ class WebparseApi {
|
|
|
648
943
|
}
|
|
649
944
|
async getWebTomarkdownAsyncStatus(args = {}) {
|
|
650
945
|
const params = {};
|
|
946
|
+
const body = {};
|
|
651
947
|
let path = '/api/v1/web/tomarkdown/async/{task_id}';
|
|
652
948
|
if (args['task_id'] !== undefined)
|
|
653
949
|
path = path.replace('{' + 'task_id' + '}', String(args['task_id']));
|
|
654
|
-
return this.c._request('GET', path, params);
|
|
950
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
655
951
|
}
|
|
656
952
|
async getWebparseExtractimages(args = {}) {
|
|
657
953
|
const params = {};
|
|
954
|
+
const body = {};
|
|
658
955
|
if (args["url"] !== undefined)
|
|
659
956
|
params["url"] = args["url"];
|
|
660
957
|
let path = '/api/v1/webparse/extractimages';
|
|
661
|
-
return this.c._request('GET', path, params);
|
|
958
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
662
959
|
}
|
|
663
960
|
async getWebparseMetadata(args = {}) {
|
|
664
961
|
const params = {};
|
|
962
|
+
const body = {};
|
|
665
963
|
if (args["url"] !== undefined)
|
|
666
964
|
params["url"] = args["url"];
|
|
667
965
|
let path = '/api/v1/webparse/metadata';
|
|
668
|
-
return this.c._request('GET', path, params);
|
|
966
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
669
967
|
}
|
|
670
968
|
async postWebTomarkdownAsync(args = {}) {
|
|
671
969
|
const params = {};
|
|
970
|
+
const body = {};
|
|
672
971
|
if (args["url"] !== undefined)
|
|
673
972
|
params["url"] = args["url"];
|
|
674
973
|
let path = '/api/v1/web/tomarkdown/async';
|
|
675
|
-
return this.c._request('POST', path, params);
|
|
974
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
676
975
|
}
|
|
677
976
|
}
|
|
678
977
|
class MinGanCiShiBieApi {
|
|
@@ -681,20 +980,27 @@ class MinGanCiShiBieApi {
|
|
|
681
980
|
}
|
|
682
981
|
async getSensitiveWordAnalyzeQuery(args = {}) {
|
|
683
982
|
const params = {};
|
|
983
|
+
const body = {};
|
|
684
984
|
if (args["keyword"] !== undefined)
|
|
685
985
|
params["keyword"] = args["keyword"];
|
|
686
986
|
let path = '/api/v1/sensitive-word/analyze-query';
|
|
687
|
-
return this.c._request('GET', path, params);
|
|
987
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
688
988
|
}
|
|
689
989
|
async postSensitiveWordAnalyze(args = {}) {
|
|
690
990
|
const params = {};
|
|
991
|
+
const body = {};
|
|
992
|
+
if (args["keywords"] !== undefined)
|
|
993
|
+
body["keywords"] = args["keywords"];
|
|
691
994
|
let path = '/api/v1/sensitive-word/analyze';
|
|
692
|
-
return this.c._request('POST', path, params);
|
|
995
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
693
996
|
}
|
|
694
997
|
async postSensitiveWordQuickCheck(args = {}) {
|
|
695
998
|
const params = {};
|
|
999
|
+
const body = {};
|
|
1000
|
+
if (args["text"] !== undefined)
|
|
1001
|
+
body["text"] = args["text"];
|
|
696
1002
|
let path = '/api/v1/text/profanitycheck';
|
|
697
|
-
return this.c._request('POST', path, params);
|
|
1003
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
698
1004
|
}
|
|
699
1005
|
}
|
|
700
1006
|
class ZhiNengSouSuoApi {
|
|
@@ -703,12 +1009,28 @@ class ZhiNengSouSuoApi {
|
|
|
703
1009
|
}
|
|
704
1010
|
async getSearchEngines(args = {}) {
|
|
705
1011
|
const params = {};
|
|
1012
|
+
const body = {};
|
|
706
1013
|
let path = '/api/v1/search/engines';
|
|
707
|
-
return this.c._request('GET', path, params);
|
|
1014
|
+
return this.c._request('GET', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
708
1015
|
}
|
|
709
1016
|
async postSearchAggregate(args = {}) {
|
|
710
1017
|
const params = {};
|
|
1018
|
+
const body = {};
|
|
1019
|
+
if (args["fetch_full"] !== undefined)
|
|
1020
|
+
body["fetch_full"] = args["fetch_full"];
|
|
1021
|
+
if (args["filetype"] !== undefined)
|
|
1022
|
+
body["filetype"] = args["filetype"];
|
|
1023
|
+
if (args["query"] !== undefined)
|
|
1024
|
+
body["query"] = args["query"];
|
|
1025
|
+
if (args["site"] !== undefined)
|
|
1026
|
+
body["site"] = args["site"];
|
|
1027
|
+
if (args["sort"] !== undefined)
|
|
1028
|
+
body["sort"] = args["sort"];
|
|
1029
|
+
if (args["time_range"] !== undefined)
|
|
1030
|
+
body["time_range"] = args["time_range"];
|
|
1031
|
+
if (args["timeout_ms"] !== undefined)
|
|
1032
|
+
body["timeout_ms"] = args["timeout_ms"];
|
|
711
1033
|
let path = '/api/v1/search/aggregate';
|
|
712
|
-
return this.c._request('POST', path, params);
|
|
1034
|
+
return this.c._request('POST', path, params, Object.keys(body).length > 0 ? body : undefined);
|
|
713
1035
|
}
|
|
714
1036
|
}
|