diff --git "a/jiaoyou_tongyong/\351\202\200\350\257\267\346\250\241\345\235\227.md" "b/jiaoyou_tongyong/\351\202\200\350\257\267\346\250\241\345\235\227.md" index 6678501..abd3414 100644 --- "a/jiaoyou_tongyong/\351\202\200\350\257\267\346\250\241\345\235\227.md" +++ "b/jiaoyou_tongyong/\351\202\200\350\257\267\346\250\241\345\235\227.md" @@ -1,6 +1,111 @@ - BaseUrl - - 测试环境: http://api-pre.heyqiwu.cn:48081 - - 生产环境: https://tongyong.jiaoyou365.com/api/xiaowu + - 测试环境: https://hw-gz26.heyqiwu.cn/api/tongyong/ + - 生产环境: https://tongyong.jiaoyou365.com/api/xiaowu/ + + +#### 生成邀请基本信息 + +URL: {BaseUrl}/info/generate + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | +| App-Version | APP版本号 | + +RequestBody: + +```json +{ + "uid":"001", // 邀请者ID + "workName": "小狗小白" // 作品名称 当作品名称为空是邀请使用app +} + +``` + +ResponseBody: + +```json +{ + "code": 1, // 1 成功; 其他状态码 失败 + "msg": "成功", // 提示信息 + "encrypt": 0, // 0 表示不解密, 1 表示解密 + "data": { // 响应的数据 + "transferUrl": "https://hw-gz26.heyqiwu.cn/downloadpage?inviteRecordId=8", // 分享地址 + "des": "晓悟互动小说,是一款非常有趣的互动小说应用,利用语音交互技术,可以让你代入到小说中的主角角色,带给你互动式的新阅读体验。", // 描述 + "imageUrl": "http://image.heyqiwu.cn/media/mp/img/mobileapp/xiaoshuo_app_card.jpg", // 分享的图片 + "title": "晓悟互动小说", // 分享的标题 + "extraInfo": { // 额外传递的信息 + "inviteRecordId": "8" // 邀请ID + } + } +} +``` + +RequestExample +``` +curl --location --request POST 'https://hw-gz26.heyqiwu.cn/api/tongyong/invite/info/generate' \ +--header 'Timestamp: 1661830332514' \ +--header 'Authorization: 7e4d29e656c96421f099330e3754744e' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'App-Version: 1.2.3' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "uid":"0001", + "workName":"" +}' + +curl --location --request POST 'https://hw-gz26.heyqiwu.cn/api/tongyong/invite/info/generate' \ +--header 'Timestamp: 1661830509668' \ +--header 'Authorization: 58b0fb36bbf2b5d5cb1ee866315e0442' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'App-Version: 1.2.3' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "uid":"0001", + "workName":"小狗小白" +}' +``` + +ResponseExample +``` +{ + "code": 1, + "msg": "成功", + "encrypt": 0, + "data": { + "transferUrl": "https://hw-gz26.heyqiwu.cn/downloadpage?inviteRecordId=8", + "des": "晓悟互动小说,是一款非常有趣的互动小说应用,利用语音交互技术,可以让你代入到小说中的主角角色,带给你互动式的新阅读体验。", + "imageUrl": "http://image.heyqiwu.cn/media/mp/img/mobileapp/xiaoshuo_app_card.jpg", + "title": "晓悟互动小说", + "extraInfo": { + "inviteRecordId": "8" + } + } +} + +{ + "code": 1, + "msg": "成功", + "encrypt": 0, + "data": { + "transferUrl": "https://hw-gz26.heyqiwu.cn/downloadpage?inviteRecordId=9", + "des": "森林里面的小狗小白和弟弟小黑在玩游戏的时候,遇到了大青蛇在欺负小青蛙,他们会怎么做呢?", + "imageUrl": "http://api-pre.heyqiwu.cn/media/gz25bot0806xiaogouxiaobaiqu012170840/img/dEMSYYC1603351782068_cover_detail_page_4x3_512x384_50.jpeg", + "title": "", + "extraInfo": { + "inviteRecordId": "9" + } + } +} +``` + #### 进入落地页的记录 @@ -21,9 +126,7 @@ RequestBody: ```json { - "workName":"小狗小白", // 作品ID - "inviteUid":"123", // 邀请者的UID - "channelId":"test" // 邀请者的渠道ID + // 可扩展字段 } ``` @@ -41,15 +144,13 @@ ResponseBody: RequestExample ``` -curl --location --request POST 'http://api-pre.heyqiwu.cn:48081/invite/record/landing/page' \ +curl --location --request POST 'https://hw-gz26.heyqiwu.cn/api/tongyong/invite/record/landing/page' \ +--header 'Timestamp: 1661830945090' \ +--header 'Authorization: 7093a24dd32eec37b16205a47ecc442a' \ --header 'App-Channel-Id: landing-page-h5-test' \ ---header 'Timestamp: 1661172849422' \ ---header 'Authorization: c986494794463cedb28702f0879d27c2' \ --header 'Content-Type: application/json' \ --data-raw '{ - "workName":"小狗小白", - "inviteUid":"123", - "channelId":"test" + "inviteRecordId": "9" }' ``` @@ -77,14 +178,16 @@ RequestHeaders: | Timestamp | 请求时的时间戳,毫秒级 | | Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | | App-Channel-Id | 渠道ID | +| App-Version | APP版本号 | RequestBody: ```json { - "workName":"小狗小白", // 作品名称 - "inviteUid":"123", // 邀请人ID - "invitedUid":"345" // 被邀请人ID + "uid":"005", // 用户ID + "extraInfo":{ // 额外信息 + "inviteRecordId": "9" + } } ``` @@ -102,15 +205,17 @@ ResponseBody: RequestExample ``` -curl --location --request POST 'http://api-pre.heyqiwu.cn:48081/invite/record' \ ---header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ ---header 'Timestamp: 1660116039438' \ ---header 'Authorization: e246031304af17af07882a622ac3f5ce' \ +curl --location --request POST 'https://hw-gz26.heyqiwu.cn/api/tongyong/invite/record' \ +--header 'Timestamp: 1661833921431' \ +--header 'Authorization: 916bccae5288e9f5d733b68201aa51e5' \ +--header 'App-Channel-Id: douyinh5game-phone-sdk-test' \ +--header 'App-Version: 1.2.4' \ --header 'Content-Type: application/json' \ --data-raw '{ - "workName":"小狗小白", - "inviteUid":"123", - "invitedUid":"345" + "uid":"005", + "extraInfo":{ + "inviteRecordId": "9" + } }' ```