client/docs/relation/friend.md

471 lines
11 KiB
Markdown
Raw Normal View History

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