此API提供用户好友互动、私人聊天、群组聊天等功能
此API参考是按资源类型组织的。每种资源类型都有一个或多个数据表示形式和一个或多个方法。
资源类型
ContactList
有关“ContactList”的详细信息,请参见资源表示页面。
Method | HTTP request | Description |
---|---|---|
archive | GET /api/party/contact-list/archive/ | 获取归档联系人列表 |
inbox | GET /api/party/contact-list/inbox/ | 获取会话联系人列表 |
getContact | GET /api/party/contact-list/get_contact/ | 获取指定联系人信息 |
blackList | GET /api/party/contact-list/black_list/ | 获取黑名单列表 |
updateRelation | POST /api/party/contact-list/update_relation/ | 更新联系人关系 |
Group
有关“Group”的详细信息,请参见资源表示页面。
Method | HTTP request | Description |
---|---|---|
get | GET /api/party/group/ | 获取群组列表 |
create | POST /api/party/group/ | 创建一个群组 |
addMember | POST /api/party/group/{id}/add_member/ | 指定群组ID,添加用户成为该群的成员 |
removeMember | POST /api/party/group/{id}/remove_member/ | 移除一个群组成员 |
rename | POST /api/party/group/{id}/rename/ | 重命名群组名字 |
getAvatar | GET /api/party/group/{id}/get_avatar/ | 获取群组头像 |
dismiss | POST /api/party/group/{id}/dismiss/ | 解散一个群组 |
restore | POST /api/party/group/{id}/restore/ | 恢复一个群组 |
getMember | GET /api/party/group/{id}/get_member/ | 指定群组ID,获取群组成员列表 |
black | POST /api/party/group/{id}/black/ | 拉黑(离开)一个群组 |
unblack | POST /api/party/group/{id}/unblack/ | 取消拉黑(重返)一个群组 |
mergeRequest | POST /api/party/group/{id}/merge_request/ | 发送群组合并请求 |
processMergeRequest | POST /api/party/group/{id}/process_merge_request/ | 处理群组合并请求 |
Message
有关“Message”的详细信息,请参见资源表示页面。
Method | HTTP request | Description |
---|---|---|
create | POST /api/party/message/ | 创建一条聊天消息 |
broadcast | POST /api/party/message/broadcast/ | 发送广播消息 |
markRead | POST /api/party/message/mark_read/ | 标记指定联系人已读当前所有消息 |
history | POST /api/party/message/history/ | 获取消息历史记录 |
Enums
ContactList.Status
enum Status {
Stranger = 0,
Creating = 100,
Applying = 200,
Created = 300,
Recalled = 400,
Rejected = 500,
Black = 600
}
Group.Status
enum Status {
CREATED = 0
REQUESTING_MERGE = 100
CHECKING_MERGE = 200
DISMISS = 300
DELETED = 500
}
Message.Message_type
enum Message_type {
FRIEND_IM = 0
GROUP_IM = 100
GROUP_PM = 200
BROADCAST = 300
LIKED = 400
COMMENT = 500
INVITATION = 600
SYSTEM = 700
FRIEND_APPLY = 800
FRIEND_ACCEPT = 900
FRIEND_REJECT = 1000
FRIEND_RECALL = 2000
ORDER = 1100
GROUP_MERGE_REQUEST = 1200
GROUP_MERGE = 1300
GROUP_DISMISS = 1400
GROUP_RESTORE = 1500
GROUP_NEW_MEMBER = 1600
GROUP_BLACK = 1700
GROUP_UNBLACK = 1800
GROUP_REMOVE_MEMBER = 1810
GROUP_RESTORE_MEMBER = 1820
GROUP_MERGE_REQUEST_REJECT = 1900
GROUP_NEW = 2100
RELATION_REQUEST = 2200
RELATION_ACCEPT = 2300
RELATION_REJECT = 2400
GROUP_NEW_NAME = 2500
PAY_ERROR = 2600
NO_RECEIPET_ACCOUNT = 2700
DIMZOU_NEW_REWORD = 3000
DIMZOU_NEW_CHECK_STATUS = 3100
DIMZOU_NEW_COMMENT = 3200
DIMZOU_NEW_LIKE = 3300
DIMZOU_NEW_COLLABORATOR = 3400
DIMZOU_COLLABORATOR_UPDATED = 3500
DIMZOU_NEW_COPY_BUNDLE = 3600
NOTIFICATION = 4000
}