sophhub 0.2.2 → 0.2.3
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/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flight-booking",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"types": [
|
|
5
5
|
"builtin"
|
|
6
6
|
],
|
|
7
7
|
"displayName": "国内机票预定",
|
|
8
8
|
"description": "",
|
|
9
9
|
"changelog": [
|
|
10
|
+
{
|
|
11
|
+
"changes": [
|
|
12
|
+
"修正票务网关基址为 https://www.sophnet.com/api,避免请求落到 /v1/api 导致 405 或非 JSON 响应"
|
|
13
|
+
],
|
|
14
|
+
"date": "2026-04-16",
|
|
15
|
+
"version": "1.1.1"
|
|
16
|
+
},
|
|
10
17
|
{
|
|
11
18
|
"changes": [
|
|
12
19
|
"初次提交"
|
|
@@ -16,5 +23,5 @@
|
|
|
16
23
|
}
|
|
17
24
|
],
|
|
18
25
|
"createdAt": "2026-04-09",
|
|
19
|
-
"updatedAt": "2026-04-
|
|
26
|
+
"updatedAt": "2026-04-16"
|
|
20
27
|
}
|
|
@@ -14,7 +14,7 @@ import requests
|
|
|
14
14
|
|
|
15
15
|
# API 配置(新版网关,Bearer API_KEY 鉴权)
|
|
16
16
|
|
|
17
|
-
GATEWAY_BASE_URL = "https://www.sophnet.com/
|
|
17
|
+
GATEWAY_BASE_URL = "https://www.sophnet.com/api"
|
|
18
18
|
|
|
19
19
|
TICKET_BASE = f"{GATEWAY_BASE_URL}/open-apis/ticket"
|
|
20
20
|
def _resolve_api_key() -> str:
|
|
@@ -33,6 +33,7 @@ def _resolve_api_key() -> str:
|
|
|
33
33
|
raise RuntimeError("未找到 SOPH_API_KEY:请设置环境变量 SOPH_API_KEY ")
|
|
34
34
|
|
|
35
35
|
API_KEY = _resolve_api_key()
|
|
36
|
+
|
|
36
37
|
# 乘机人信息从环境变量读取(用户需提前设置)
|
|
37
38
|
ENV_PASSENGER_NAME = "PASSENGER_NAME"
|
|
38
39
|
ENV_PASSENGER_MOBILE = "PASSENGER_MOBILE"
|