##### 收藏作品 URL: /api/favorite?module=works METHOD: POST URL Parameters | Parameter | Type | Description | SendWay| | :----------- | :------: | ------------: | :------------- | | aipioneerUsername | String | 作品ID | RequestsParam | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | responseBody: ``` SUCCESS: { "code":1, "msg":成功, "data":null } FAILTURE: { "code":20002, "msg":用户认证失败!, "data":null } ``` ##### 取消作品收藏 URL: /api/favorite?module=works METHOD: DELETE URL Parameters | Parameter | Type | Description | SendWay| | :----------- | :------: | ------------: | :------------- | | aipioneerUsername | String | 作品ID | RequestsParam | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | responseBody: ``` SUCCESS: { "code":1, "msg":成功, "data":null } FAILTURE: { "code":20002, "msg":用户认证失败!, "data":null } ``` ##### 收藏作品列表 URL: /api/favorite?module=works METHOD: GET URL Parameters | Parameter | Type | Description | SendWay| | :----------- | :------: | ------------: | :------------- | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | responseBody: ``` SUCCESS: { "code":1, "msg":成功, "data":[ { worksName: ,// 作品名称 authorName:, aipioneerUsername: , // 作品用户名 } ] } FAILTURE: { "code":20002, "msg":用户认证失败!, "data":null } ``` ##### 获取作品角色信息并更新最近一次用户玩的作品信息 URL: /api/npc/voiceClass METHOD: GET URL Parameters | Parameter | Type | Description | SendWay| | :----------- | :------: | ------------: | :------------- | | aipioneerUsername | String | 作品ID | RequestsParam | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | responseBody: ``` SUCCESS: { "code":1, "msg":成功!, "data":{ npcName:voiceClass } } FAILTURE: { "code":50001, "msg":作品不存在!, "data":null } ``` ##### 获得用户最后一次玩的作品 URL: /api/user/current_play_works METHOD: GET URL Parameters | Parameter | Type | Description | SendWay| | :----------- | :------: | ------------: | :------------- | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | responseBody: ``` { "code":1, "msg":成功!, "data":{ aipioneerUsername:"", // 最近一次用户玩的作品 worksName:"" // 最近一次玩的作品名称 } } FAILTURE: { "code":20002, "msg":用户认证失败!, "data":null } { "code":50001, "msg":您当前没有玩过任何作品!, "data":null } { "code":50001, "msg":当前作品不存在!, "data":null } ``` ##### 获取音频 (app) URL: http://qcloud-sh1.chewrobot.com:9663/api/tts METHOD: POST URL Parameters | Parameter | Type | Description | SendWay | | :----------- | :------: | :------------ | :-----------| | person | Number | 声音的类别 | JSON| | tone | Number | 声音的语气 | JSON| | text | String | 播放语音的文本内容 | JSON| | _type | String | 返回数据类型(可选参数)| JSON | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/json;charset=utf-8 | responseBody: ``` 如果_type 参数不添加,直接返回音频文件 直接返回音频的二进制数据 数据格式为: mp3 如果 "_type":"json" { "audio": "http://qcloud-sh1.chewrobot.com:9663/api/v1/tts/get_audio?dirs=[1,0]&filename=xxx.mp3", // 音频的url "status": true // 是否调用成功 } ```