Skip to content

Commit f5b5ac7

Browse files
committed
chore(release): publish v0.1.10
1 parent 19d4dff commit f5b5ac7

325 files changed

Lines changed: 18913 additions & 1166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# uapi-sdk-python
22

3-
![Banner](https://raw.githubusercontent.com/uapis/uapi-sdk-python/main/banner.png)
3+
![Banner](https://raw.githubusercontent.com/AxT-Team/uapi-sdk-python/main/banner.png)
44

55
[![Python](https://img.shields.io/badge/Python-3.9+-3776AB?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
66
[![Docs](https://img.shields.io/badge/Docs-uapis.cn-2EAE5D?style=flat-square)](https://uapis.cn/)

internal/.openapi-generator/FILES

Lines changed: 213 additions & 16 deletions
Large diffs are not rendered by default.

internal/README.md

Lines changed: 135 additions & 64 deletions
Large diffs are not rendered by default.

internal/docs/ConvertApi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ All URIs are relative to *https://uapis.cn/api/v1*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**get_convert_unixtime**](ConvertApi.md#get_convert_unixtime) | **GET** /convert/unixtime | Unix时间戳与日期字符串双向转换
8-
[**post_convert_json**](ConvertApi.md#post_convert_json) | **POST** /convert/json | 美化并格式化JSON字符串
7+
[**get_convert_unixtime**](ConvertApi.md#get_convert_unixtime) | **GET** /convert/unixtime | 时间戳转换
8+
[**post_convert_json**](ConvertApi.md#post_convert_json) | **POST** /convert/json | JSON 格式化
99

1010

1111
# **get_convert_unixtime**
1212
> GetConvertUnixtime200Response get_convert_unixtime(time)
1313
14-
Unix时间戳与日期字符串双向转换
14+
时间戳转换
1515

1616
时间戳和日期字符串,哪个用着更顺手?别纠结了,这个接口让你轻松拥有两种格式!
1717

@@ -53,7 +53,7 @@ with uapi.ApiClient(configuration) as api_client:
5353
time = '1698380645' # str | 一个智能时间参数,可传入Unix时间戳(10位或13位)或标准日期字符串(如 '2023-10-27 10:30:00'),系统将自动识别并转换。
5454

5555
try:
56-
# Unix时间戳与日期字符串双向转换
56+
# 时间戳转换
5757
api_response = api_instance.get_convert_unixtime(time)
5858
print("The response of ConvertApi->get_convert_unixtime:\n")
5959
pprint(api_response)
@@ -95,7 +95,7 @@ No authorization required
9595
# **post_convert_json**
9696
> PostConvertJson200Response post_convert_json(post_convert_json_request)
9797
98-
美化并格式化JSON字符串
98+
JSON 格式化
9999

100100
还在为一团乱麻的 JSON 字符串头疼吗?这个接口能瞬间让它变得井井有条,赏心悦目。
101101

@@ -134,7 +134,7 @@ with uapi.ApiClient(configuration) as api_client:
134134
post_convert_json_request = uapi.PostConvertJsonRequest() # PostConvertJsonRequest | 这是一个JSON对象,里面必须包含一个名为 `content` 的字段。这个字段的值,就是你希望格式化的、原始的JSON字符串。
135135

136136
try:
137-
# 美化并格式化JSON字符串
137+
# JSON 格式化
138138
api_response = api_instance.post_convert_json(post_convert_json_request)
139139
print("The response of ConvertApi->post_convert_json:\n")
140140
pprint(api_response)

internal/docs/DailyApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ All URIs are relative to *https://uapis.cn/api/v1*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**get_daily_news_image**](DailyApi.md#get_daily_news_image) | **GET** /daily/news-image | 生成每日新闻摘要图片
7+
[**get_daily_news_image**](DailyApi.md#get_daily_news_image) | **GET** /daily/news-image | 每日新闻图
88

99

1010
# **get_daily_news_image**
1111
> bytearray get_daily_news_image()
1212
13-
生成每日新闻摘要图片
13+
每日新闻图
1414

1515
想用一张图快速了解天下大事?这个接口为你一键生成今日新闻摘要,非常适合用在早报、数字看板或应用首页等场景。
1616

@@ -48,7 +48,7 @@ with uapi.ApiClient(configuration) as api_client:
4848
api_instance = uapi.DailyApi(api_client)
4949

5050
try:
51-
# 生成每日新闻摘要图片
51+
# 每日新闻图
5252
api_response = api_instance.get_daily_news_image()
5353
print("The response of DailyApi->get_daily_news_image:\n")
5454
pprint(api_response)

internal/docs/DefaultApi.md

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ All URIs are relative to *https://uapis.cn/api/v1*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**get_search_engines**](DefaultApi.md#get_search_engines) | **GET** /search/engines | 获取搜索引擎信息
8-
[**get_sensitive_word_analyze_query**](DefaultApi.md#get_sensitive_word_analyze_query) | **GET** /sensitive-word/analyze-query | 查询参数分析
7+
[**get_search_engines**](DefaultApi.md#get_search_engines) | **GET** /search/engines | 搜索引擎配置
8+
[**get_sensitive_word_analyze_query**](DefaultApi.md#get_sensitive_word_analyze_query) | **GET** /sensitive-word/analyze-query | 敏感词分析 (GET)
99
[**post_search_aggregate**](DefaultApi.md#post_search_aggregate) | **POST** /search/aggregate | 智能搜索
1010
[**post_sensitive_word_analyze**](DefaultApi.md#post_sensitive_word_analyze) | **POST** /sensitive-word/analyze | 分析敏感词
1111
[**post_sensitive_word_quick_check**](DefaultApi.md#post_sensitive_word_quick_check) | **POST** /text/profanitycheck | 敏感词检测(快速)
@@ -14,7 +14,7 @@ Method | HTTP request | Description
1414
# **get_search_engines**
1515
> GetSearchEngines200Response get_search_engines()
1616
17-
获取搜索引擎信息
17+
搜索引擎配置
1818

1919
获取 UAPI Pro Search 引擎的详细信息,包括支持的功能特性、参数限制和使用说明。
2020

@@ -50,7 +50,7 @@ with uapi.ApiClient(configuration) as api_client:
5050
api_instance = uapi.DefaultApi(api_client)
5151

5252
try:
53-
# 获取搜索引擎信息
53+
# 搜索引擎配置
5454
api_response = api_instance.get_search_engines()
5555
print("The response of DefaultApi->get_search_engines:\n")
5656
pprint(api_response)
@@ -88,7 +88,7 @@ No authorization required
8888
# **get_sensitive_word_analyze_query**
8989
> PostSensitiveWordAnalyze200Response get_sensitive_word_analyze_query(keyword)
9090
91-
查询参数分析
91+
敏感词分析 (GET)
9292

9393
通过URL查询参数分析单个关键词,便于GET请求调用。
9494

@@ -115,7 +115,7 @@ with uapi.ApiClient(configuration) as api_client:
115115
keyword = '' # str | 要分析的关键词,最长50字符。
116116

117117
try:
118-
# 查询参数分析
118+
# 敏感词分析 (GET)
119119
api_response = api_instance.get_sensitive_word_analyze_query(keyword)
120120
print("The response of DefaultApi->get_sensitive_word_analyze_query:\n")
121121
pprint(api_response)
@@ -164,10 +164,12 @@ No authorization required
164164

165165
## 功能概述
166166

167-
UAPI Pro Search 是自研的智能搜索引擎,采用机器学习算法对搜索结果进行智能排序,确保最相关的内容排在前面。你可以用它搜索任何关键词,也可以限定在特定网站或特定文件类型中搜索。
167+
UAPI Pro Search 是一个智能搜索引擎,采用机器学习算法对搜索结果进行智能排序,确保最相关的内容排在前面。你可以用它搜索任何关键词,也可以限定在特定网站或特定文件类型中搜索。
168168

169169
- **实时网页搜索**: 毫秒级响应,快速返回搜索结果
170170
- **智能排序**: 采用机器学习回归排序算法,结果更精准
171+
- **时间排序**: 支持按发布时间排序,获取最新内容
172+
- **时间范围过滤**: 支持按天/周/月/年过滤结果
171173
- **站内搜索**: 支持 `site:` 操作符,在指定网站内搜索
172174
- **文件类型过滤**: 支持 `filetype:` 操作符,快速找到 PDF、Word 等特定格式文件
173175

@@ -246,7 +248,7 @@ No authorization required
246248
247249
分析敏感词
248250

249-
分析单个或多个关键词的敏感程度,返回详细的风险评分和分析结果
251+
分析单个或多个关键词的敏感程度,返回标准化风险标签与置信度结果
250252

251253
> [!VIP]
252254
> 本API基于先进的分析模型,提供三级缓存策略和并发处理能力。
@@ -256,30 +258,19 @@ No authorization required
256258
- **模型驱动**: 使用先进的分析模型进行语义分析。
257259
- **高性能**: 采用三级缓存策略(持久化存储 → 统一缓存 → 模型分析),确保高频请求的响应速度。
258260
- **并发支持**: 支持批量并发处理,单次最多可分析100个关键词。
259-
- **详细评分**: 提供色情、辱骂、暴力三个维度的详细风险评分。
260-
- **变体识别**: 能够自动识别关键词的常见变体形式,如拼音、缩写等。
261-
262-
## 风险评分说明
263-
264-
返回的 `s` 字段包含三个维度的风险评分,范围均为0.0至1.0:
265-
266-
- **s[0] - 色情风险**: 评估内容涉及色情信息的程度。
267-
- **s[1] - 辱骂/仇恨言论风险**: 评估内容是否包含侮辱性或仇恨性言论。
268-
- **s[2] - 暴力/威胁风险**: 评估内容是否涉及暴力或威胁信息。
269-
270-
风险等级可参考:0.0-0.3为低风险,0.3-0.7为中等风险,0.7-1.0为高风险。
261+
- **标准标签**: 返回 `label` 字段,明确区分 `sensitive``normal`
262+
- **分类清晰**: 返回 `category` 字段,用于标识具体风险类别。
263+
- **置信度输出**: 返回 `confidence` 字段,范围为0.0到1.0。
271264

272265
## 响应字段说明
273266

274267
| 字段 | 类型 | 说明 |
275268
|------|------|------|
276269
| `results` | array | 分析结果对象的数组。 |
277270
| `results[].k` | string | 您在请求中提供的原始关键词。 |
278-
| `results[].r` | string | 模型对该关键词的分析过程和判断理由的简要说明。 |
279-
| `results[].s` | array[float] | 一个包含三个浮点数的数组,分别代表[色情, 辱骂, 暴力]三个维度的风险评分。分值范围从0.0到1.0,越高代表风险越大。 |
280-
| `results[].v` | array[string] | 模型识别出的该关键词的常见变体形式,例如拼音、谐音、缩写等。 |
281-
| `results[].t` | array[string] | 根据分析结果为关键词附加的分类标签,便于进行程序化处理和过滤。 |
282-
| `results[].d` | string | 对整体分析结果的一句简短总结,适合直接展示给用户或记录在日志中。 |
271+
| `results[].label` | string | 核心判断字段:`sensitive`(敏感)、`normal`(正常)。 |
272+
| `results[].category` | string | 风险分类:`safe`(安全)、`threat`(威胁)、`porn`(色情)、`fraud`(欺诈)、`insult`(辱骂)。 |
273+
| `results[].confidence` | number | 当前分类的置信度,范围0.0到1.0。 |
283274
| `total` | integer | 本次请求成功分析的关键词总数。 |
284275
285276

internal/docs/GameApi.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ All URIs are relative to *https://uapis.cn/api/v1*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**get_game_epic_free**](GameApi.md#get_game_epic_free) | **GET** /game/epic-free | 获取Epic Games免费游戏
8-
[**get_game_minecraft_historyid**](GameApi.md#get_game_minecraft_historyid) | **GET** /game/minecraft/historyid | 查询Minecraft玩家历史用户名
9-
[**get_game_minecraft_serverstatus**](GameApi.md#get_game_minecraft_serverstatus) | **GET** /game/minecraft/serverstatus | 查询Minecraft服务器状态
10-
[**get_game_minecraft_userinfo**](GameApi.md#get_game_minecraft_userinfo) | **GET** /game/minecraft/userinfo | 查询Minecraft玩家信息
11-
[**get_game_steam_summary**](GameApi.md#get_game_steam_summary) | **GET** /game/steam/summary | 获取Steam用户公开摘要
7+
[**get_game_epic_free**](GameApi.md#get_game_epic_free) | **GET** /game/epic-free | Epic 免费游戏
8+
[**get_game_minecraft_historyid**](GameApi.md#get_game_minecraft_historyid) | **GET** /game/minecraft/historyid | 查询 MC 曾用名
9+
[**get_game_minecraft_serverstatus**](GameApi.md#get_game_minecraft_serverstatus) | **GET** /game/minecraft/serverstatus | 查询 MC 服务器
10+
[**get_game_minecraft_userinfo**](GameApi.md#get_game_minecraft_userinfo) | **GET** /game/minecraft/userinfo | 查询 MC 玩家
11+
[**get_game_steam_summary**](GameApi.md#get_game_steam_summary) | **GET** /game/steam/summary | 查询 Steam 用户
1212

1313

1414
# **get_game_epic_free**
1515
> GetGameEpicFree200Response get_game_epic_free()
1616
17-
获取Epic Games免费游戏
17+
Epic 免费游戏
1818

1919
白嫖党的福音来了!想第一时间知道Epic商店本周送了哪些游戏大作吗?
2020

@@ -53,7 +53,7 @@ with uapi.ApiClient(configuration) as api_client:
5353
api_instance = uapi.GameApi(api_client)
5454

5555
try:
56-
# 获取Epic Games免费游戏
56+
# Epic 免费游戏
5757
api_response = api_instance.get_game_epic_free()
5858
print("The response of GameApi->get_game_epic_free:\n")
5959
pprint(api_response)
@@ -90,19 +90,25 @@ No authorization required
9090
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
9191

9292
# **get_game_minecraft_historyid**
93-
> GetGameMinecraftHistoryid200Response get_game_minecraft_historyid(uuid)
93+
> GetGameMinecraftHistoryid200Response get_game_minecraft_historyid(name=name, uuid=uuid)
9494
95-
查询Minecraft玩家历史用户名
95+
查询 MC 曾用名
9696

9797
想知道某个大佬以前叫什么名字吗?这个接口可以帮你追溯一个 Minecraft 玩家的“黑历史”!
9898

9999
## 功能概述
100-
通过提供一个玩家的 UUID,你可以获取到该玩家所有曾用名及其变更时间的列表。这对于识别回归的老玩家或者社区管理非常有用。
100+
通过提供玩家的用户名或 UUID,你可以获取到该玩家所有曾用名及其变更时间的列表。这对于识别回归的老玩家或者社区管理非常有用。
101101

102102
## 使用须知
103103
> [!NOTE]
104-
> **UUID 格式**
105-
> 查询时,请务必提供玩家的 **32位无破折号** Minecraft UUID,例如 `ee9b4ed1aac1491eb7611471be374b80`
104+
> **参数说明**
105+
> - `name``uuid` 二选一
106+
> - UUID 支持带连字符(如 `ee9b4ed1-aac1-491e-b761-1471be374b80`)或不带连字符格式
107+
108+
> [!IMPORTANT]
109+
> **响应结构差异**
110+
> - 使用 `uuid` 查询:返回单个用户的历史记录
111+
> - 使用 `name` 查询:返回所有匹配用户的列表(包括当前用户名或曾用名匹配的玩家),需判断响应中是否有 `results` 字段来区分两种模式
106112
107113
### Example
108114

@@ -124,11 +130,12 @@ configuration = uapi.Configuration(
124130
with uapi.ApiClient(configuration) as api_client:
125131
# Create an instance of the API class
126132
api_instance = uapi.GameApi(api_client)
127-
uuid = 'ee9b4ed1aac1491eb7611471be374b80' # str | 玩家的 Minecraft UUID,请务必使用32位无破折号的格式。
133+
name = 'ExamplePlayer' # str | 玩家的 Minecraft 用户名。使用此参数查询时,会返回所有匹配用户的列表(包括当前用户名或曾用名匹配的玩家)。 (optional)
134+
uuid = 'ee9b4ed1-aac1-491e-b761-1471be374b80' # str | 玩家的 Minecraft UUID,支持带连字符或不带连字符格式。 (optional)
128135

129136
try:
130-
# 查询Minecraft玩家历史用户名
131-
api_response = api_instance.get_game_minecraft_historyid(uuid)
137+
# 查询 MC 曾用名
138+
api_response = api_instance.get_game_minecraft_historyid(name=name, uuid=uuid)
132139
print("The response of GameApi->get_game_minecraft_historyid:\n")
133140
pprint(api_response)
134141
except Exception as e:
@@ -142,7 +149,8 @@ with uapi.ApiClient(configuration) as api_client:
142149

143150
Name | Type | Description | Notes
144151
------------- | ------------- | ------------- | -------------
145-
**uuid** | **str**| 玩家的 Minecraft UUID,请务必使用32位无破折号的格式。 |
152+
**name** | **str**| 玩家的 Minecraft 用户名。使用此参数查询时,会返回所有匹配用户的列表(包括当前用户名或曾用名匹配的玩家)。 | [optional]
153+
**uuid** | **str**| 玩家的 Minecraft UUID,支持带连字符或不带连字符格式。 | [optional]
146154

147155
### Return type
148156

@@ -161,17 +169,17 @@ No authorization required
161169

162170
| Status code | Description | Response headers |
163171
|-------------|-------------|------------------|
164-
**200** | 查询成功!返回该玩家的完整用户名历史记录。 | - |
165-
**400** | 请求失败。请检查你是否提供了 `uuid` 参数,以及它的格式是否为32位无破折号字符串。 | - |
172+
**200** | 查询成功!根据查询方式返回不同结构: - **uuid 查询**:返回单个用户的历史记录 - **name 查询**:返回匹配用户列表(判断响应中是否有 `results` 字段来区分) | - |
173+
**400** | 请求失败。请检查你是否提供了 `name``uuid` 参数中的至少一个。 | - |
166174
**404** | 用户未找到。我们根据你提供的 UUID 未能找到对应的 Minecraft 玩家。请确认 UUID 是否正确。 | - |
167-
**502** | 上游服务错误。在向 Mojang 的官方 API 请求数据时遇到了问题。这可能是他们的服务暂时中断,请稍后重试。 | - |
175+
**502** | 服务暂时不可用,请稍后重试。 | - |
168176

169177
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
170178

171179
# **get_game_minecraft_serverstatus**
172180
> GetGameMinecraftServerstatus200Response get_game_minecraft_serverstatus(server)
173181
174-
查询Minecraft服务器状态
182+
查询 MC 服务器
175183

176184
想在加入服务器前看看有多少人在线?或者检查一下服务器开没开?用这个接口就对了!
177185

@@ -201,7 +209,7 @@ with uapi.ApiClient(configuration) as api_client:
201209
server = 'hypixel.net' # str | Minecraft服务器的地址,可以是域名(如 `hypixel.net`)或 `IP:端口` 的形式(如 `mc.example.com:25565`)。如果省略端口,将默认使用 `25565`。
202210

203211
try:
204-
# 查询Minecraft服务器状态
212+
# 查询 MC 服务器
205213
api_response = api_instance.get_game_minecraft_serverstatus(server)
206214
print("The response of GameApi->get_game_minecraft_serverstatus:\n")
207215
pprint(api_response)
@@ -245,7 +253,7 @@ No authorization required
245253
# **get_game_minecraft_userinfo**
246254
> GetGameMinecraftUserinfo200Response get_game_minecraft_userinfo(username)
247255
248-
查询Minecraft玩家信息
256+
查询 MC 玩家
249257

250258
只需要一个玩家的用户名,就能快速获取到他的正版皮肤和独一无二的UUID!
251259

@@ -275,7 +283,7 @@ with uapi.ApiClient(configuration) as api_client:
275283
username = 'Notch' # str | 玩家的 Minecraft 游戏内名称(正版ID)。
276284

277285
try:
278-
# 查询Minecraft玩家信息
286+
# 查询 MC 玩家
279287
api_response = api_instance.get_game_minecraft_userinfo(username)
280288
print("The response of GameApi->get_game_minecraft_userinfo:\n")
281289
pprint(api_response)
@@ -319,7 +327,7 @@ No authorization required
319327
# **get_game_steam_summary**
320328
> GetGameSteamSummary200Response get_game_steam_summary(steamid=steamid, id=id, id3=id3, key=key)
321329
322-
获取Steam用户公开摘要
330+
查询 Steam 用户
323331

324332
想在你的网站或应用中展示用户的 Steam 个人资料?这个接口就是为你准备的。
325333

@@ -370,7 +378,7 @@ with uapi.ApiClient(configuration) as api_client:
370378
key = 'key_example' # str | 你的 Steam Web API Key。这是一个可选参数,如果提供,它将覆盖我们在后端配置的全局Key。这为你提供了更大的灵活性,但请务必注意Key的保密,不要在前端暴露。 (optional)
371379

372380
try:
373-
# 获取Steam用户公开摘要
381+
# 查询 Steam 用户
374382
api_response = api_instance.get_game_steam_summary(steamid=steamid, id=id, id3=id3, key=key)
375383
print("The response of GameApi->get_game_steam_summary:\n")
376384
pprint(api_response)

internal/docs/GetAiTranslateLanguages200Response.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**code** | **int** | | [optional]
98
**message** | **str** | | [optional]
109
**data** | [**GetAiTranslateLanguages200ResponseData**](GetAiTranslateLanguages200ResponseData.md) | | [optional]
1110
**performance** | [**GetAiTranslateLanguages200ResponsePerformance**](GetAiTranslateLanguages200ResponsePerformance.md) | | [optional]

internal/docs/GetAnswerbookAsk200Response.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**code** | **int** | | [optional]
98
**question** | **str** | | [optional]
109
**answer** | **str** | | [optional]
1110

internal/docs/GetConvertUnixtime200Response.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**code** | **int** | 状态码,200代表操作成功。 | [optional]
98
**datetime** | **str** | 标准格式(YYYY-MM-DD HH:mm:ss)的日期时间字符串。 | [optional]
109
**timestamp** | **int** | 转换后的10位秒级Unix时间戳。 | [optional]
1110

0 commit comments

Comments
 (0)