lingxingapi 1.0.2__py3-none-any.whl → 1.0.4__py3-none-any.whl
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.
Potentially problematic release.
This version of lingxingapi might be problematic. Click here for more details.
- lingxingapi/basic/api.py +4 -4
- lingxingapi/basic/schema.py +9 -3
- {lingxingapi-1.0.2.dist-info → lingxingapi-1.0.4.dist-info}/METADATA +9 -2
- {lingxingapi-1.0.2.dist-info → lingxingapi-1.0.4.dist-info}/RECORD +7 -7
- {lingxingapi-1.0.2.dist-info → lingxingapi-1.0.4.dist-info}/WHEEL +0 -0
- {lingxingapi-1.0.2.dist-info → lingxingapi-1.0.4.dist-info}/licenses/LICENSE +0 -0
- {lingxingapi-1.0.2.dist-info → lingxingapi-1.0.4.dist-info}/top_level.txt +0 -0
lingxingapi/basic/api.py
CHANGED
|
@@ -48,7 +48,7 @@ class BasicAPI(BaseAPI):
|
|
|
48
48
|
# 站点区域
|
|
49
49
|
"region": "NA",
|
|
50
50
|
# 站点亚马逊仓库所属区域 [原字段 'aws_region']
|
|
51
|
-
"
|
|
51
|
+
"region_aws": "NA",
|
|
52
52
|
# 站点国家 (中文)
|
|
53
53
|
"country": "美国",
|
|
54
54
|
# 站点国家代码 [原字段 'code']
|
|
@@ -309,7 +309,7 @@ class BasicAPI(BaseAPI):
|
|
|
309
309
|
"data": [
|
|
310
310
|
{
|
|
311
311
|
# 领星账号所从属的ID (如主帐号ID) [原字段 'zid']
|
|
312
|
-
"
|
|
312
|
+
"parent_id": 1,
|
|
313
313
|
# 领星帐号ID [唯一标识] [原字段 'uid']
|
|
314
314
|
"user_id": 1,
|
|
315
315
|
# 是否为主账号 (0: 否, 1: 是)
|
|
@@ -380,8 +380,8 @@ class BasicAPI(BaseAPI):
|
|
|
380
380
|
# 响应数据
|
|
381
381
|
"data": [
|
|
382
382
|
{
|
|
383
|
-
# 汇率日期 (格式: YYYY-MM)
|
|
384
|
-
"date": "2025-01",
|
|
383
|
+
# 汇率日期 (格式: YYYY-MM-DD)
|
|
384
|
+
"date": "2025-01-01",
|
|
385
385
|
# 货币名称 (中文) [原字段 'name']
|
|
386
386
|
"currency": "美元",
|
|
387
387
|
# 货币代码 [原字段 'code']
|
lingxingapi/basic/schema.py
CHANGED
|
@@ -14,7 +14,7 @@ class Marketplace(BaseModel):
|
|
|
14
14
|
# 站点区域
|
|
15
15
|
region: str
|
|
16
16
|
# 站点亚马逊仓库所属区域 [原字段 'aws_region']
|
|
17
|
-
|
|
17
|
+
region_aws: str = Field(validation_alias="aws_region")
|
|
18
18
|
# 站点国家 (中文)
|
|
19
19
|
country: str
|
|
20
20
|
# 站点国家代码 [原字段 'code']
|
|
@@ -151,7 +151,7 @@ class Account(BaseModel):
|
|
|
151
151
|
"""领星账号."""
|
|
152
152
|
|
|
153
153
|
# 领星账号所从属的ID (如主帐号ID) [原字段 'zid']
|
|
154
|
-
|
|
154
|
+
parent_id: int = Field(validation_alias="zid")
|
|
155
155
|
# 领星帐号ID [唯一标识] [原字段 'uid']
|
|
156
156
|
user_id: int = Field(validation_alias="uid")
|
|
157
157
|
# 是否为主账号 (0: 否, 1: 是)
|
|
@@ -190,7 +190,7 @@ class Accounts(ResponseV1):
|
|
|
190
190
|
class ExchangeRate(BaseModel):
|
|
191
191
|
"""货币汇率."""
|
|
192
192
|
|
|
193
|
-
# 汇率日期 (格式: YYYY-MM)
|
|
193
|
+
# 汇率日期 (格式: YYYY-MM-DD)
|
|
194
194
|
date: str
|
|
195
195
|
# 货币名称 (中文) [原字段 'name']
|
|
196
196
|
currency: str = Field(validation_alias="name")
|
|
@@ -205,6 +205,12 @@ class ExchangeRate(BaseModel):
|
|
|
205
205
|
# 用户汇率修改时间 (北京时间)
|
|
206
206
|
update_time: str
|
|
207
207
|
|
|
208
|
+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
209
|
+
@field_validator("date", mode="after")
|
|
210
|
+
@classmethod
|
|
211
|
+
def _validate_date(cls, v: str) -> str:
|
|
212
|
+
return v + "-01"
|
|
213
|
+
|
|
208
214
|
|
|
209
215
|
class ExchangeRates(ResponseV1):
|
|
210
216
|
"""货币汇率查询结果."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lingxingapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: An async API client for LingXing (领星) ERP
|
|
5
5
|
Home-page: https://github.com/AresJef/LingXingApi
|
|
6
6
|
Author: Jiefu Chen
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.10
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: aiohttp>=3.8.4
|
|
18
|
-
Requires-Dist: cytimes>=2.
|
|
18
|
+
Requires-Dist: cytimes>=2.1.1
|
|
19
19
|
Requires-Dist: numpy>=1.25.2
|
|
20
20
|
Requires-Dist: orjson>=3.10.2
|
|
21
21
|
Requires-Dist: pycryptodome>=3.23.0
|
|
@@ -50,9 +50,16 @@ pip install git+https://github.com/AresJef/LingXingApi.git
|
|
|
50
50
|
```python
|
|
51
51
|
from lingxingapi import API
|
|
52
52
|
|
|
53
|
+
# Context Manager
|
|
53
54
|
async def test(self, app_id: str, app_secret: str) -> None:
|
|
54
55
|
async with API(app_id, app_secret) as api:
|
|
55
56
|
sellers = await api.basic.Sellers()
|
|
57
|
+
|
|
58
|
+
# Close Manually
|
|
59
|
+
async def test(self, app_id: str, app_secret: str) -> None:
|
|
60
|
+
api = API(app_id, app_secret)
|
|
61
|
+
sellers = await api.basic.Sellers()
|
|
62
|
+
await api.close()
|
|
56
63
|
```
|
|
57
64
|
|
|
58
65
|
### Acknowledgements
|
|
@@ -14,10 +14,10 @@ lingxingapi/base/param.py,sha256=X5-fpqF1g_7SfSeMiEABchhTjOnRw5ik5-1zB_ZAM_8,197
|
|
|
14
14
|
lingxingapi/base/route.py,sha256=b-hRndWGVmKfFo2wbGBh6h2xLlhGkmL4k8D27EYI_YU,593
|
|
15
15
|
lingxingapi/base/schema.py,sha256=xRyRuvr-0w9Mg-A5wG5acn3oJknIg9CceVGQyWkUbPQ,6012
|
|
16
16
|
lingxingapi/basic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
lingxingapi/basic/api.py,sha256=
|
|
17
|
+
lingxingapi/basic/api.py,sha256=Y68md7YOEcLP00tCJUrRKHvqe7kytC8GHLwkEolVlI8,17566
|
|
18
18
|
lingxingapi/basic/param.py,sha256=Mq-ZIKHy1DA7aspu1K4MrZe2-FYCJ8Vz43EN5JpHjnA,2480
|
|
19
19
|
lingxingapi/basic/route.py,sha256=0CXP8rIoBZHrj6gxy1jHycsO9UIunFXwmuU9ryEU0eg,1119
|
|
20
|
-
lingxingapi/basic/schema.py,sha256=
|
|
20
|
+
lingxingapi/basic/schema.py,sha256=4Dc1QJ6fQUgOifEybJVRnLLv4foTcGTsPQAM2dX7q4Q,6699
|
|
21
21
|
lingxingapi/fba/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
lingxingapi/fba/api.py,sha256=jA1F2JELEcaWsrAXNu4JaDutuoDOFwjITb0VUDFM3uc,75653
|
|
23
23
|
lingxingapi/fba/param.py,sha256=hvrwpwTeT6wu5y6jCaM5qVD-LrRlZ7BBruvLQvt5VV8,8989
|
|
@@ -58,8 +58,8 @@ lingxingapi/warehourse/api.py,sha256=5EgYo5IrmxLN7Km0CiPT7xQwgNPK6jgFyDhcnIZQ9Xg
|
|
|
58
58
|
lingxingapi/warehourse/param.py,sha256=DLnLwti1SK6NjKITtH8og_3gA-2Ymt5FLaUZPtwC1H0,22901
|
|
59
59
|
lingxingapi/warehourse/route.py,sha256=A4FK2EUUuUDc6zE11Wl63A7YJPpzJnKDvkA-3xyLyPs,1914
|
|
60
60
|
lingxingapi/warehourse/schema.py,sha256=Kltkpznt7Ksf1EEAKyfUBR9Z_2oYU1mhhn8bYjZWnYA,47749
|
|
61
|
-
lingxingapi-1.0.
|
|
62
|
-
lingxingapi-1.0.
|
|
63
|
-
lingxingapi-1.0.
|
|
64
|
-
lingxingapi-1.0.
|
|
65
|
-
lingxingapi-1.0.
|
|
61
|
+
lingxingapi-1.0.4.dist-info/licenses/LICENSE,sha256=oQj0ddF8bHhbdDscjUiJeB3ps0sMasLHbc6tyDHqM_s,1082
|
|
62
|
+
lingxingapi-1.0.4.dist-info/METADATA,sha256=d2GKk0WMq-1lA1r12WcZkGGAdDgj_ID280MMudqiUZY,1898
|
|
63
|
+
lingxingapi-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
64
|
+
lingxingapi-1.0.4.dist-info/top_level.txt,sha256=oJVokkthGq3IRqL37Njwi5mNTBfXIbRQ1dQif3HIO1U,12
|
|
65
|
+
lingxingapi-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|