diff --git a/README-zh.md b/README-zh.md index a17242f..726dc32 100644 --- a/README-zh.md +++ b/README-zh.md @@ -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草稿目录,即可看到生成的草稿 diff --git a/README.md b/README.md index a07c681..4a02613 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/rest_client_test.http b/rest_client_test.http new file mode 100644 index 0000000..eefa5ec --- /dev/null +++ b/rest_client_test.http @@ -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/" +} \ No newline at end of file