Skip to content

Commit 43a2aaa

Browse files
committed
Upgraded SDK V1.10.6 support Upstream API V5.0.5
1 parent 6fc96f1 commit 43a2aaa

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

dist/tikhub-1.10.6-py3-none-any.whl

54.9 KB
Binary file not shown.

dist/tikhub-1.10.6.tar.gz

36.3 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="tikhub",
16-
version="1.10.5",
16+
version="1.10.6",
1717
author="TikHub.io",
1818
author_email="tikhub.io@proton.me",
1919
description="A Python SDK for TikHub RESTful API",

tikhub/api/v1/endpoints/temp_mail/__init__.py

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 导入API SDK Client类
2+
3+
from tikhub.http_client.api_client import APIClient
4+
5+
6+
class TempMailV1:
7+
# 初始化 | Initialize
8+
def __init__(self, client: APIClient):
9+
self.client = client
10+
11+
# 获取一个临时邮箱 | Get a temporary email
12+
async def get_temp_email_address(self):
13+
endpoint = "/api/v1/temp_mail/v1/get_temp_email_address"
14+
data = await self.client.fetch_get_json(f"{endpoint}")
15+
return data
16+
17+
# 获取邮件列表 | Get a list of emails
18+
async def get_emails_inbox(self, token: str):
19+
endpoint = "/api/v1/temp_mail/v1/get_emails_inbox"
20+
data = await self.client.fetch_get_json(f"{endpoint}?token={token}")
21+
return data
22+
23+
# 通过邮件ID获取邮件数据 | Get email data by email ID
24+
async def get_email_by_id(self, token: str, message_id: str):
25+
endpoint = "/api/v1/temp_mail/v1/get_email_by_id"
26+
data = await self.client.fetch_get_json(f"{endpoint}?token={token}&message_id={message_id}")
27+
return data

0 commit comments

Comments
 (0)