# Friend relation-关系管理:好友 - [/relation.Friend/Search](#relationfriendsearch) - [/relation.Friend/Fetch](#relationfriendfetch) - [/relation.Friend/Get](#relationfriendget) - [/relation.Friend/ModifyNickname](#relationfriendmodifynickname) - [/relation.Friend/DoPopular](#relationfrienddopopular) - [/relation.Friend/UndoPopular](#relationfriendundopopular) - [/relation.Friend/Delete](#relationfrienddelete) - [/relation.Friend/ApplyFetch](#relationfriendapplyfetch) - [/relation.Friend/ApplyGet](#relationfriendapplyget) - [/relation.Friend/ApplyDo](#relationfriendapplydo) - [/relation.Friend/ApplyDoMessage](#relationfriendapplydomessage) - [/relation.Friend/ApplyDoPass](#relationfriendapplydopass) - [/relation.Friend/ApplyDoReject](#relationfriendapplydoreject) - [/relation.Friend/TagFetch](#relationfriendtagfetch) - [/relation.Friend/TagMemberFetch](#relationfriendtagmemberfetch) - [/relation.Friend/TagDoCreate](#relationfriendtagdocreate) - [/relation.Friend/TagDoUpdate](#relationfriendtagdoupdate) ## /relation.Friend/Search 搜索 ### Request ```javascript { keyword: "", // type, 关键词 } ``` ### Reply ```javascript { total: 0, // type, 总记录数 version: "0", // type, 版本号 friends: [{ identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 }], // list, 好友信息 } ``` ## /relation.Friend/Fetch 获取好友列表 ### Request ```javascript { version: "0", // type, 时序版本号 } ``` ### Reply ```javascript { total: 0, // type, 总记录数 version: "0", // type, 版本号 tags: [{ id: "0", // type, 好友标签ID identity: "", // type, 标签唯一标识 friend_total: "0", // type, 标签成员统计 tag_name: "", // type, 标签名称 }], // list, 分组标签信息 friends: [{ identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 }], // list, 好友信息 } ``` ## /relation.Friend/Get 获取用户信息卡片 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 } ``` ## /relation.Friend/ModifyNickname 修改好友备注名称,如果要清除备注,直接nickname传空值 ### Request ```javascript { identity: "", // type, 会员唯一标识 nickname: "", // type, 新的备注名称 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/DoPopular 受你欢迎的,置顶 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/UndoPopular 取消受欢迎的,取消置顶 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/Delete 删除好友 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/ApplyFetch 好友申请列表 ### Request ```javascript { version: "0", // type, 时序版本号 } ``` ### Reply ```javascript { total: 0, // type, 总记录数 version: "0", // type, 版本号 applys: [{ identity: "", // type, 唯一标识 from: { identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 }, // type message: { relation_identity: "", // type, 发送者 body: "", // type, 正文 created_at: "", // type, 时间 }, // type created_at: "", // type, 时间 status: 0, // type, 状态 }], // list } ``` ## /relation.Friend/ApplyGet 好友申请详情 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { data: { identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 }, // type, 会员信息卡片 message: [{ relation_identity: "", // type, 发送者 body: "", // type, 正文 created_at: "", // type, 时间 }], // list, 聊天记录 } ``` ## /relation.Friend/ApplyDo 好友申请 ### Request ```javascript { to_id: "0", // type, 目标人的唯一ID to_identity: "", // type, 目标人的唯一标识 body: "", // type, 留言正文 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/ApplyDoMessage 好友申请Do:留言 ### Request ```javascript { apply_id: "0", // type, 申请ID body: "", // type, 留言正文 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/ApplyDoPass 好友申请Do:确认 ### Request ```javascript { friend_relation_id: "0", // type, 为将要通过的好友会员通行证唯一ID friend_relation_identity: "", // type, 为将要通过的好友会员通行证唯一Identity apply_identity: "", // type, 申请的唯一标识 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/ApplyDoReject 好友申请Do:拒绝 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/TagFetch 获取标签列表 ### Request ```javascript {} ``` ### Reply ```javascript { total: "0", // type, 总记录数 data: [{ id: "0", // type, 好友标签ID identity: "", // type, 标签唯一标识 friend_total: "0", // type, 标签成员统计 tag_name: "", // type, 标签名称 }], // list } ``` ## /relation.Friend/TagMemberFetch 获取标签成员 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { total: 0, // type, 总记录数 version: "0", // type, 版本号 friends: [{ identity: "", // type nickname: "", // type, 昵称 remark_name: "", // type, 备注名称 popular: 0, // type, 是否置顶 avatar: "", // type birthday: "", // type, 生日 sex: 0, // type, 性别,1为男性,2为女性 province: 0, // type, 省 city: 0, // type, 市 area: 0, // type, 区 sign: "", // type, 签名 tags: [""], // list, 所属标签组 foreign_status: 0, // type, 外表的状态值,根据表不同,值的作用不同 }], // list, 好友信息 } ``` ## /relation.Friend/TagDoCreate 创建标签 ### Request ```javascript { tag_name: "", // type, 标签名称 friend_identity: [""], // list, 成员identity } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /relation.Friend/TagDoUpdate 更新标签成员 ### Request ```javascript { tag_identity: "", // type, 标签唯一标识 friend_identity: "", // type, 成员identity direction: "", // type, 操作方式:ADD增加成员,DEL删除成员 } ``` ### Reply ```javascript { data: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ```