Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jiaoyou_doc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李进峰
jiaoyou_doc
Commits
a4928631
Commit
a4928631
authored
Nov 17, 2023
by
陈宥希
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传新文件
parent
b4f95cd7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
558 additions
and
0 deletions
+558
-0
自动生成参数查询及保存_v20231108.md
dramaeditor/自动生成参数查询及保存_v20231108.md
+558
-0
No files found.
dramaeditor/自动生成参数查询及保存_v20231108.md
0 → 100644
View file @
a4928631
# 自动生成参数查询及保存
# 自动生成参数查询及保存
**测试环境URL**
: tx-gz18.heyqiwu.cn
**生产环境URL**
: juben.jiaoyou365.com
## 1. 查询故事对应的故事背景和玩家角色名
**METHOD**
: POST
**path**
: /api/juben/aigc/getSetting
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------ | -------- | ------------------------------------ |
| projectId | test | 是 | 项目id(剧本编辑器中的故事唯一编号) |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/getWorkSetting'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
}
'
```
**ResponseBody.data:**
| 参数名 | 示例值 | 参数描述 |
| --------- | ------------------------------------------------------------ | ---------------- |
| projectId | 2701 | 项目id |
| setting | 一个养女儿的游戏,玩家选择成为女儿的父亲或者母亲,通过自己的选择来教育女儿正确的三观。 | 故事背景 |
| player | 阿全 | 故事的玩家角色名 |
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
{
"projectId"
:
2701
,
"setting"
:
"你是一个作家,需要你根据现有的内容帮我写一段剧情。故事如下,一个养女儿的游戏,玩家选择成为女儿的父亲或者母亲,通过自己的选择来教育女儿正确的三观。"
}
}
```
## 2. 保存故事背景和玩家角色名
**METHOD**
: POST
**path**
: /api/juben/aigc/saveSetting
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------------------------------------------------------------ | -------- | -------------- |
| projectId | 2701 | 是 | 项目id |
| setting | 一个养女儿的游戏,玩家选择成为女儿的父亲或者母亲,通过自己的选择来教育女儿正确的三观。 | 是 | 新的故事背景 |
| player | 阿全 | 是 | 新的玩家角色名 |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/saveSetting'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"setting"
:
"你是一个作家,需要你根据现有的内容帮我写一段剧情。故事如下,一个养女儿的游戏,玩家选择成为女儿的父亲或者母亲,通过自己的选择来教育女儿正确的三观。"
}
'
```
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
null
}
```
## 3. 查询剧情点的主题、大纲、角色列表
**METHOD**
: POST
**path**
: /api/juben/aigc/getPlotPointParam
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------- | -------- | ------------------------------------------------------------ |
| projectId | 2701 | 是 | 故事的项目id |
| plotId | 6402316 | 是 | 要查询的剧情点id(由/api/juben/plotpoint/detail接口返回的"data"."id"字段) |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/getPlotPointParam'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"plotId"
:
"6402316"
}
'
```
**ResponseBody.data:**
| 参数名 | 示例值 | 参数描述 |
| ----------- | ------------ | ------------------------------------ |
| projectId | 2701 | 故事的项目id |
| plotId | 6402316 | 剧情点id |
| themeId | 1 | 剧情点的主题 |
| isEntryPlot | false | 当前剧情点是否是其所属主题的入口剧情 |
| scenario | 大纲内容 | 剧情点的大纲 |
| roleList | 陆昭
\|
柯小敏 | 剧情点的NPC角色列表 |
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
{
"projectId"
:
2701
,
"plotId"
:
6402316
,
"themeId"
:
1
,
"isEntryPlot"
:
true
,
"scenario"
:
"大纲内容"
,
"roleList"
:
"陆昭|柯小敏"
,
"player"
:
"阿权"
}
}
```
## 4. 保存剧情点的主题、大纲、角色列表
**METHOD**
: POST
**path**
: /api/juben/aigc/savePlotPointParam
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------------ | -------- | --------------- |
| projectId | 2701 | 是 | 故事的项目id |
| plotId | 6402316 | 是 | 剧情点id |
| themeId | 1 | 是 | 新的主题id |
| scenario | 大纲内容 | 是 | 新的大纲 |
| roleList | 陆昭
\|
柯小敏 | 是 | 新的NPC角色列表 |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/savePlotPointParam'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"plotId"
:
"6402316"
,
"themeId"
:
"1"
,
"scenario"
:
"大纲内容"
,
"roleList"
:
"陆昭|柯小敏"
,
"player"
:
"阿全"
}
'
```
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
null
}
```
## 5. 查询故事下的所有主题信息
**METHOD**
: POST
**path**
: /api/juben/aigc/getThemes
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------ | -------- | ------------------ |
| projectId | 2701 | 是 | 要查询故事的项目id |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/getThemes'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
}
'
```
**ResponseBody.data.themeList:**
| 参数名 | 示例值 | 参数描述 |
| --------------- | -------- | -------------------- |
| themeId | 1 | 主题id |
| theme | 主题内容 | 主题内容 |
| entryPlot | 6402316 | 主题的入口剧情点id |
| entryPlotNumber | 1-1-1 | 主题的入口剧情点编号 |
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
{
"projectId"
:
2701
,
"themeList"
:
[
{
"themeId"
:
1
,
"theme"
:
"主题内容"
,
"entryPlot"
:
"6402316"
,
"entryPlotNumber"
:
"1-1-1"
},
{
"themeId"
:
2
,
"theme"
:
"另一个主题内容"
,
"entryPlot"
:
"6402322"
,
"entryPlotNumber"
:
"2-1-1"
}
]
}
}
```
## 6. 故事下新增主题
**METHOD**
: POST
**path**
: /api/juben/aigc/createTheme
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | -------- | -------- | ------------ |
| projectId | 2701 | 是 | 故事的项目id |
| theme | 主题内容 | 是 | 新的主题内容 |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/createTheme'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"theme"
:
"主题内容"
}
'
```
**ResponseBody.data:**
| 参数名 | 示例值 | 参数描述 |
| --------- | ------ | -------------- |
| projectId | 2701 | 故事的项目id |
| themeId | 1 | 新分配的主题id |
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
{
"projectId"
:
2701
,
"themeId"
:
1
}
}
```
## 7. 故事下修改指定主题内容
**METHOD**
: POST
**path**
: /api/juben/aigc/modifyTheme
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | -------- | -------- | -------------- |
| projectId | 2701 | 是 | 故事的项目id |
| themeId | 1 | 是 | 要修改的主题id |
| theme | 主题内容 | 是 | 新的主题内容 |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/modifyTheme'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"themeId"
:
"1"
,
"theme"
:
"主题内容"
}
'
```
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
null
}
```
## 8. 查询指定主题下的剧情点列表
**METHOD**
: POST
**path**
: /api/juben/aigc/getThemePlots
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------ | -------- | -------------- |
| projectId | 2701 | 是 | 故事的项目id |
| themeId | 1 | 是 | 要查询的主题id |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/getThemePlots'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"themeId"
:
"1"
}
'
```
**ResponseBody.data.plotList:**
| 参数名 | 示例值 | 参数描述 |
| ---------- | ------- | ---------- |
| plotId | 6402316 | 剧情点id |
| plotNumber | 1-1-1 | 剧情点编号 |
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
{
"projectId"
:
2701
,
"themeId"
:
1
,
"plotList"
:
[
{
"plotId"
:
"6402316"
,
"plotNumber"
:
"1-1-1"
},
{
"plotId"
:
"6402322"
,
"plotNumber"
:
"2-1-1"
}
]
}
}
```
## 9. 故事下删除指定主题
**METHOD**
: POST
**path**
: /api/juben/aigc/deleteTheme
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------ | -------- | -------------- |
| projectId | 2701 | 是 | 故事的项目id |
| themeId | 1 | 是 | 要删除的主题id |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/deleteTheme'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"themeId"
:
"1"
}
'
```
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
null
}
```
## 10. 设置主题的入口剧情点
**METHOD**
: POST
**path**
: /api/juben/aigc/setThemeEntryPlot
**RequestHeaders:**
| key | description |
| -------------- | ------------------------------ |
| Content-Type | application/json,charset=utf-8 |
| App-Channel-Id |
****
**
|
| AppVersion |
****
**
|
**RequestBody:**
| 参数名 | 示例值 | 是否必填 | 参数描述 |
| --------- | ------- | -------- | -------------------------------------- |
| projectId | 2701 | 是 | 故事的项目id |
| themeId | 1 | 是 | 要设置的主题id |
| entryPlot | 6402316 | 否 | 新的入口剧情点id,若不设置则传入空串 |
#### 请求示例
```
json
curl
--location
--request
POST
'https
:
//juben.jiaoyou
365
.com/api/aigc/setThemeEntryPlot'
\
--header
'App-Channel-Id
:
test'
\
--header
'AppVersion
:
1.0
.
0
'
\
--header
'Content-Type
:
application/json'
\
--data
'
{
"projectId"
:
"2701"
,
"themeId"
:
"1"
,
"entryPlot"
:
"6402316"
}
'
```
#### 响应实例
```
json
{
"code"
:
1
,
"msg"
:
"成功"
,
"data"
:
null
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment