You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.en.md
+22-14Lines changed: 22 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
#### **Introduction**
7
7
8
-
🎉「[TikHub.io](https://tikhub.io/)"Is a**开箱即用的集成工具以及服务的平台**, our goal is to help users quickly start business and support function customization. Our vision is to form a community entrepreneurship project. A single tree cannot grow into a forest, but cooperation can lead to a win-win situation.**Every community member has the opportunity to integrate the functions or interfaces they write into our platform and benefit from them**. We have accumulated a large number of registered users and community users, and in order to realize this vision, we are actively planning and implementing cooperation strategies to ensure the sustainable and healthy development of the ecosystem. Welcome everyone to join us[Discord](https://discord.gg/aMEAS8Xsvz)Community.
8
+
🎉「[TikHub.io](https://tikhub.io/)"Is a**A platform for out-of-the-box integration tools and services**, our goal is to help users quickly start business and support function customization. Our vision is to form a community entrepreneurship project. A single tree cannot grow into a forest, but cooperation can lead to win-win results.**Every community member has the opportunity to integrate the functions or interfaces they write into our platform and benefit from them**. We have accumulated a large number of registered users and community users, and in order to realize this vision, we are actively planning and implementing cooperation strategies to ensure the sustainable and healthy development of the ecosystem. Welcome everyone to join us[Discord](https://discord.gg/aMEAS8Xsvz)Community.
9
9
10
10
* * *
11
11
@@ -17,7 +17,7 @@ All APIs are written based on the OPenAPI specification, which means you can use
17
17
18
18
<https://api.tikhub.io/openapi.json>
19
19
20
-
当然,我们已经默认使用了Swagger UI来展示我们的API文档,你可以在网页上打开下面的链接,然后在网页上进行API Token的认证,随后点击任意端点然后点击`Try it out`You can test the endpoints you need. Most endpoints already carry default values or demo values, which will better help you understand the required parameters of the call:
20
+
Of course, we have used Swagger UI by default to display our API documents. You can open the following link on the web page, then authenticate the API Token on the web page, then click on any endpoint and click`Try it out`You can test the endpoints you need. Most endpoints already carry default values or demo values, which will better help you understand the required parameters of the call:
21
21
22
22
<https://api.tikhub.io>
23
23
@@ -31,13 +31,13 @@ The endpoints with the 🔒 icon in the interface document need to carry the API
31
31
32
32
> Generate API Token
33
33
34
-
The steps to obtain API Token are also very simple. You only need to log in to our user backend.[Stay tuned](https://tikhub.io/users/api_keys), then click on the left`API Keys`You can generate your own API Token, and at the same time, you can customize the permissions of the API Token (`Scopes`), you can also set the expiration date of the API Token (`Expire Date`), you can also manually temporarily close the API Token (`Status`)。
34
+
The steps to obtain API Token are also very simple, you only need to log in to our user backend[Stay tuned](https://tikhub.io/users/api_keys), then click on the left`API Keys`You can generate your own API Token, and at the same time, you can customize the permissions of the API Token (`Scopes`), you can also set the expiration date of the API Token (`Expire Date`), you can also manually temporarily close the API Token (`Status`)。
35
35
36
36
> Used on the API documentation web page
37
37
38
38
After you complete the above steps, you can copy your API Token, then return to our Swagger UI web page and click the green on the right side of the page`Authorize`, and then at the bottom of the pop-up window`Value`Paste the API Token in the input box to complete the authentication.
39
39
40
-
> Used in HTTP requests
40
+
> 在HTTP请求中使用
41
41
42
42
If you want to carry the API Token in the HTTP request, please read the format below carefully, and you need to carry a called`Authorization`Field, below I will give an example of JSON as header:
- We have used HTTPX to asynchronously encapsulate most endpoints. If your code is executed synchronously, you can use the following code to prevent asynchronous infection.
146
146
147
147
```python
148
-
import asyncio
149
-
150
148
# 获取抖音单一视频数据 | Get a single video data from Douyin
151
149
deffetch_one_video(aweme_id: str):
152
-
# 使用asyncio.run防止异步传染到其他代码
153
-
# Use asyncio.run to prevent asynchronous infection to other code
# If an exception occurs, return the exception information
162
+
returnstr(e)
163
+
finally:
164
+
# 关闭异步事件循环
165
+
# Close the asynchronous event
166
+
loop.close()
159
167
```
160
168
161
169
- Due to the limited chapters, the complete methods are not listed here. You can view the methods implemented in each attribute by viewing the source code, and the parameters accepted by each method have been added.`type hints`。
0 commit comments