|
@@ -17,7 +17,7 @@ public class V0Controller {
|
|
@ApiOperation(value = "创建项目")
|
|
@ApiOperation(value = "创建项目")
|
|
@PostMapping({"/projects"})
|
|
@PostMapping({"/projects"})
|
|
public Response projects(@RequestBody JSONObject jsonObject) {
|
|
public Response projects(@RequestBody JSONObject jsonObject) {
|
|
- String sync = OkHttpUtils.builder().url("https://api.v0.dev/projects")
|
|
|
|
|
|
+ String sync = OkHttpUtils.builder().url("https://api.v0.dev/v1/projects")
|
|
.addParam(jsonObject)
|
|
.addParam(jsonObject)
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|
|
.addHeader("Authorization", "Bearer v1:OdiTOd4JMzwdd6mQ4FIo4QTh:r16t2Epsy3eR51SmnPoKDvNN")
|
|
.addHeader("Authorization", "Bearer v1:OdiTOd4JMzwdd6mQ4FIo4QTh:r16t2Epsy3eR51SmnPoKDvNN")
|
|
@@ -30,7 +30,7 @@ public class V0Controller {
|
|
@ApiOperation(value = "创建聊天")
|
|
@ApiOperation(value = "创建聊天")
|
|
@PostMapping({"/chats"})
|
|
@PostMapping({"/chats"})
|
|
public Response chats(@RequestBody JSONObject jsonObject) {
|
|
public Response chats(@RequestBody JSONObject jsonObject) {
|
|
- String sync = OkHttpUtils.builder().url("https://api.v0.dev/chats")
|
|
|
|
|
|
+ String sync = OkHttpUtils.builder().url("https://api.v0.dev/v1/chats")
|
|
.addParam(jsonObject)
|
|
.addParam(jsonObject)
|
|
// 也可以添加多个
|
|
// 也可以添加多个
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|
|
@@ -46,7 +46,7 @@ public class V0Controller {
|
|
@ApiImplicitParam(name = "chatId", value = "要向其发送消息的聊天的唯一标识符")
|
|
@ApiImplicitParam(name = "chatId", value = "要向其发送消息的聊天的唯一标识符")
|
|
})
|
|
})
|
|
public Response chatsMessages(@RequestBody JSONObject jsonObject, @PathVariable String chatId) {
|
|
public Response chatsMessages(@RequestBody JSONObject jsonObject, @PathVariable String chatId) {
|
|
- String sync = OkHttpUtils.builder().url("https://api.v0.dev/chats/"+chatId+"/messages")
|
|
|
|
|
|
+ String sync = OkHttpUtils.builder().url("https://api.v0.dev/v1/chats/"+chatId+"/messages")
|
|
.addParam(jsonObject)
|
|
.addParam(jsonObject)
|
|
// 也可以添加多个
|
|
// 也可以添加多个
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|
|
.addHeader("Content-Type", "application/json; charset=utf-8")
|