mirror of
https://github.com/sun-guannan/CapCutAPI.git
synced 2025-11-25 03:15:00 +08:00
添加http 示例
This commit is contained in:
@@ -114,6 +114,7 @@ response = requests.post("http://localhost:9000/save_draft", json={
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
也可以用 REST Client 的 ```rest_client_test.http``` 进行http测试,只需要安装对应的IDE插件
|
||||
|
||||
### 复制草稿到剪映/capcut草稿路径
|
||||
调用`save_draft`会在服务器当前目录下生成一个`dfd_`开头的文件夹,将他复制到剪映/CapCut草稿目录,即可看到生成的草稿
|
||||
|
||||
@@ -116,6 +116,7 @@ response = requests.post("http://localhost:9000/save_draft", json={
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
You can also use the ```rest_client_test.http``` file of the REST Client for HTTP testing. Just need to install the corresponding IDE plugin
|
||||
|
||||
### Copying the Draft to CapCut Draft Path
|
||||
|
||||
|
||||
33
rest_client_test.http
Normal file
33
rest_client_test.http
Normal file
@@ -0,0 +1,33 @@
|
||||
###添加文本
|
||||
POST http://localhost:9001/add_text
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"text": "你好,世界!",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"font": "SourceHanSansCN_Regular",
|
||||
"font_color": "#FF0000",
|
||||
"font_size": 30.0
|
||||
}
|
||||
|
||||
###添加视频
|
||||
POST http://localhost:9001/add_video
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"video_url": "https://cdn.qikongjian.com/1752788403_5rnfds.mp4",
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"width": 1080,
|
||||
"height": 1920
|
||||
}
|
||||
|
||||
###保存草稿
|
||||
POST http://localhost:9001/save_draft
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"draft_id": "dfd_cat_1752912902_0cae2e04",
|
||||
"draft_folder":"/Users/xxx/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/"
|
||||
}
|
||||
Reference in New Issue
Block a user