Friends API文档
Friends API文档
基本信息
- 标题: Passport
- 版本: 1.0
API Endpoint
https://p.unity.cn
API 接口
POST /v1/sdk/friends/requests
摘要: 发送好友请求
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 发送好友请求 |
请求体结构: passportSendFriendRequestRequest
请求体示例
{
"targetPersonaID": "10000000054"
}响应
200 A successful response.
响应结构: passportSendFriendRequestResponse
响应示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/requests/
摘要: 获取好友请求信息
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requestID | string | 是 | 好友请求ID |
响应
200 A successful response.
响应结构: passportGetFriendRequestResponse
响应示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/requests/sent
摘要: 获取所有发出的好友请求
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| count | integer | int64 | 否 | 数量限制 |
| start | integer | int64 | 否 | 起始点 |
| requestStatus | string | 否 | 状态筛选 - Pending: 待处理 - Approved: 已同意 - Rejected: 已拒绝 - Expired: 已过期 - Revoked: 已取消 |
响应
200 A successful response.
响应结构: passportGetFriendRequestListResponse
响应示例
{
"requests": [
{
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
],
"start": 0,
"count": 20,
"total": 1
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/requests/received
摘要: 获取所有收到的好友请求
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| count | integer | int64 | 否 | 数量限制 |
| start | integer | int64 | 否 | 起始点 |
| requestStatus | string | 否 | 状态筛选 - Pending: 待处理 - Approved: 已同意 - Rejected: 已拒绝 - Expired: 已过期 - Revoked: 已取消 |
响应
200 A successful response.
响应结构: passportGetFriendRequestListResponse
响应示例
{
"requests": [
{
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
],
"start": 0,
"count": 20,
"total": 1
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/requests/{requestID}/approve
摘要: 通过好友请求
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requestID | string | 是 | 好友请求ID |
响应
200 A successful response.
响应结构: passportApproveFriendRequestResponse
响应示例
{
"friend": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
},
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/requests/{requestID}/reject
摘要: 拒绝好友请求
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requestID | string | 是 | 好友请求ID |
响应
200 A successful response.
响应结构: passportRejectFriendRequestResponse
响应示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/requests/approve-all
摘要: 通过所有好友请求
响应
200 A successful response.
响应结构: passportBatchApproveFriendRequestResponse
响应示例
{
"results": [
{
"requestID": "bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"friendID": "bba5ff1-b4a3-498c-9c0b-24cad73cff5",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"errorCode": 0,
"errorMessage": "error details"
}
]
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/requests/reject-all
摘要: 拒绝所有好友请求
响应
200 A successful response.
响应结构: passportBatchRejectFriendRequestResponse
响应示例
{
"results": [
{
"requestID": "bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"friendshipID": "bba5ff1-b4a3-498c-9c0b-24cad73cff5",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"errorCode": 0,
"errorMessage": "error details"
}
]
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/requests/{requestID}/cancel
摘要: 取消好友请求
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requestID | string | 是 | 好友请求ID |
响应
200 A successful response.
响应结构: passportRevokeFriendRequestResponse
响应示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends
摘要: 获取好友列表
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
响应
200 A successful response.
响应结构: passportGetFriendListResponse
响应示例
{
"friends": [
{
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
],
"start": 0,
"count": 20,
"total": 1
}default An unexpected error response.
响应结构: rpcStatus
DELETE /v1/sdk/friends/
摘要: 删除好友
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friendshipID | string | 是 | 好友关系ID |
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| removeBoth | boolean | 否 | - |
响应
200 A successful response.
响应结构: passportRemoveFriendResponse
default An unexpected error response.
响应结构: rpcStatus
PUT /v1/sdk/friends/
摘要: 更新好友信息
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friendshipID | string | 是 | 好友关系ID |
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | - |
请求体结构: PassportSDKUpdateFriendInfoBody
请求体示例
{
"alias": "newAlias"
}响应
200 A successful response.
响应结构: passportUpdateFriendInfoResponse
响应示例
{
"friend": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"customStatus": {
"customStatus": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/blacklist
摘要: 获取拉黑列表
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
响应
200 A successful response.
响应结构: passportGetBlacklistResponse
响应示例
{
"blacklist": [
{
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"createdAt": "2023-08-16T07:34:50.408Z",
"modifiedAt": "2023-08-16T07:34:50.408Z"
}
],
"start": 0,
"count": 20,
"total": 1
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/blacklist
摘要: 拉黑
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 拉黑用户请求 |
请求体结构: passportBlacklistUserRequest
请求体示例
{
"targetPersonaID": "10000000054"
}响应
200 A successful response.
响应结构: passportBlacklistUserResponse
响应示例
{
"blacklist": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"createdAt": "2023-08-16T07:34:50.408Z",
"modifiedAt": "2023-08-16T07:34:50.408Z"
}
}default An unexpected error response.
响应结构: rpcStatus
DELETE /v1/sdk/friends/blacklist/
摘要: 取消拉黑
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| blacklistID | string | 是 | 拉黑记录的ID |
响应
200 A successful response.
响应结构: passportUnblacklistUserResponse
default An unexpected error response.
响应结构: rpcStatus
DELETE /v1/sdk/friends/presence
摘要: 删除当前角色的在线信息
响应
200 A successful response.
响应结构: passportRemoveFriendPresenceResponse
default An unexpected error response.
响应结构: rpcStatus
PUT /v1/sdk/friends/presence
摘要: 设置当前角色在线信息
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 更新自定义信息(全量)请求 |
请求体结构: passportSetFriendPresenceRequest
请求体示例
{
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"status": "Online",
"ttl": "30"
}响应
200 A successful response.
响应结构: passportSetFriendPresenceResponse
响应示例
{
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"status": "Online"
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/presences
摘要: 批量获取好友在线信息
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friendshipID | array | 否 | 好友关系ID列表(可传入多个) |
响应
200 A successful response.
响应结构: passportGetFriendPresencesListResponse
响应示例
{
"propertiesList": {
"friendID1": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Online"
},
"friendID2": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Offline"
},
"friendID3": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Leave"
}
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/{friendshipID}/presence
摘要: 获取好友在线信息
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friendshipID | string | 是 | 好友关系ID |
响应
200 A successful response.
响应结构: passportGetFriendPresenceResponse
响应示例
{
"status": "Online",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"personaID": "10000000054",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54"
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/blacklist/presences
摘要: 批量获取黑名单角色在线信息
查询参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| blacklistID | array | 否 | 黑名单关系ID列表(可传入多个) |
响应
200 A successful response.
响应结构: passportGetBlacklistPresencesListResponse
响应示例
{
"propertiesList": {
"friendID1": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Online"
},
"friendID2": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Offline"
},
"friendID3": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Leave"
}
}
}default An unexpected error response.
响应结构: rpcStatus
GET /v1/sdk/friends/blacklist/{blacklistID}/presence
摘要: 获取黑名单角色在线信息
路径参数
| 参数名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| blacklistID | string | 是 | 黑名单ID |
响应
200 A successful response.
响应结构: passportGetBlacklistPresenceResponse
响应示例
{
"status": "Online",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"personaID": "10000000054",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54"
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/search-personas
摘要: 搜索其他用户以添加为好友 (需提供 1.好友名称 2.角色ID 中至少其一)
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 搜索好友请求 |
请求体结构: passportSearchFriendsRequest
请求体示例
{
"personaName": "我是一个角色",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"start": 0,
"count": 10,
"personaID": "10002321213"
}响应
200 A successful response.
响应结构: passportSearchFriendsResponse
响应示例
{
"start": 0,
"count": 10,
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/random-search-personas
摘要: 随机搜索其他角色以添加为好友
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 随机搜索好友请求 |
请求体结构: passportSearchFriendsRandomlyRequest
请求体示例
{
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"count": 10,
"localRealm": false
}响应
200 A successful response.
响应结构: passportSearchFriendsRandomlyResponse
响应示例
{
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}default An unexpected error response.
响应结构: rpcStatus
POST /v1/sdk/friends/random-find
摘要: 随机搜索其他角色以添加为好友
请求体参数
| 参数名 | 必填 | 说明 |
|---|---|---|
| body | 是 | 随机搜索好友请求 |
请求体结构: passportFindFriendsRandomlyRequest
请求体示例
{
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"count": 10,
"localRealm": false
}响应
200 A successful response.
响应结构: passportFindFriendsRandomlyResponse
响应示例
{
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}default An unexpected error response.
响应结构: rpcStatus
数据模型定义
PassportSDKUpdateFriendInfoBody
标题: UpdateFriendInfoRequest
更新好友备注信息请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| alias | string | 否 | 新备注名 |
模型示例
{
"alias": "newAlias"
}passportApproveFriendRequestResponse
标题: ApproveFriendRequestResponse
同意好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| request | passportFriendRequest | 否 | 好友请求信息 | |
| friend | passportFriendInfo | 否 | 好友信息 |
模型示例
{
"friend": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
},
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}passportBatchApproveFriendRequestResponse
标题: BatchApproveFriendRequestResponse
同意全部好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| results | array<passportBatchProcessFriendRequestResult> | 否 | - |
模型示例
{
"results": [
{
"requestID": "bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"friendID": "bba5ff1-b4a3-498c-9c0b-24cad73cff5",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"errorCode": 0,
"errorMessage": "error details"
}
]
}passportBatchProcessFriendRequestResult
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requestID | string | 否 | 好友请求ID | |
| friendshipID | string | 否 | 好友关系ID | |
| displayName | string | 否 | 好友昵称 | |
| iconUrl | string | 否 | 好友头像 | |
| errorCode | integer | int64 | 否 | 错误码 |
| errorMessage | string | 否 | 错误信息 | |
| personaID | string | 否 | 好友角色ID |
passportBatchRejectFriendRequestResponse
标题: BatchRejectFriendRequestResponse
拒绝好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| results | array<passportBatchProcessFriendRequestResult> | 否 | - |
模型示例
{
"results": [
{
"requestID": "bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"friendshipID": "bba5ff1-b4a3-498c-9c0b-24cad73cff5",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"errorCode": 0,
"errorMessage": "error details"
}
]
}passportBlacklist
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| id | string | 否 | @gotags: bson:"_id" | |
| idDomainID | string | 否 | @gotags: bson:"id_domain_id" | |
| sourcePersonaID | string | 否 | @gotags: bson:"source_persona_id" | |
| targetPersonaID | string | 否 | @gotags: bson:"target_persona_id" | |
| createdAt | string | date-time | 否 | @gotags: bson:"created_at" create time stamp |
| modifiedAt | string | date-time | 否 | @gotags: bson:"modified_at" update time stamp |
| displayName | string | 否 | 黑名单名称 | |
| iconUrl | string | 否 | 黑名单头像地址 | |
| sourceProperties | object | 否 | 发起者的自定义信息 | |
| targetProperties | object | 否 | 接受者的自定义信息 |
passportBlacklistUserRequest
标题: BlacklistUserRequest
拉黑用户请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| targetPersonaID | string | 否 | 被拉黑者的PersonaID |
模型示例
{
"targetPersonaID": "10000000054"
}passportBlacklistUserResponse
标题: BlacklistUserResponse
拉黑用户响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| blacklist | passportBlacklist | 否 | - |
模型示例
{
"blacklist": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"createdAt": "2023-08-16T07:34:50.408Z",
"modifiedAt": "2023-08-16T07:34:50.408Z"
}
}passportFindFriendsRandomlyRequest
标题: FindFriendsRandomlyRequest
随机搜索好友请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| realmID | string | 否 | 目标Realm | |
| count | integer | int64 | 否 | 数量 |
| localRealm | boolean | 否 | 是否仅搜索同Realm下(如为true,则覆盖realmID内容) |
模型示例
{
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"count": 10,
"localRealm": false
}passportFindFriendsRandomlyResponse
标题: FindFriendsRandomlyResponse
随机搜索好友响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| personas | array<passportPersona> | 否 | 可添加好友列表 |
模型示例
{
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}passportFriendInfo
标题: 好友记录,对于每个好友关系存在两条记录(A->B) (B->A)
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| id | string | 否 | @gotags: bson:"_id" | |
| idDomainID | string | 否 | @gotags: bson:"id_domain_id" | |
| sourcePersonaID | string | 否 | @gotags: bson:"source_persona_id" | |
| targetPersonaID | string | 否 | @gotags: bson:"target_persona_id" | |
| sourceRealmID | string | 否 | @gotags: bson:"source_realm_id" | |
| targetRealmID | string | 否 | @gotags: bson:"target_realm_id" | |
| Alias | string | 否 | @gotags: bson:"alias" | |
| createdAt | string | date-time | 否 | @gotags: bson:"created_at" create time stamp |
| modifiedAt | string | date-time | 否 | @gotags: bson:"modified_at" update time stamp |
| properties | object | 否 | 自定义信息 | |
| status | string | 否 | 状态 | |
| displayName | string | 否 | 好友名称 | |
| iconUrl | string | 否 | 头像地址 | |
| sourceRealmName | string | 否 | 自己的Realm名称 | |
| targetRealmName | string | 否 | 好友的Realm名称 | |
| targetPersonaProperties | object | 否 | 好友的角色自定义信息 | |
| lastLogin | string | date-time | 否 | 好友最后上线时间 |
| sourceUserID | string | 否 | 自己的UserID | |
| targetUserID | string | 否 | 好友的UserID | |
| mutual | boolean | 否 | @gotags: bson:"mutual" |
passportFriendRequest
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| id | string | 否 | @gotags: bson:"_id" | |
| idDomainID | string | 否 | @gotags: bson:"id_domain_id" | |
| sourcePersonaID | string | 否 | @gotags: bson:"source_persona_id" | |
| targetPersonaID | string | 否 | @gotags: bson:"target_persona_id" | |
| sourceRealmID | string | 否 | @gotags: bson:"source_realm_id" | |
| targetRealmID | string | 否 | @gotags: bson:"target_realm_id" | |
| status | passportFriendRequestStatuse | 否 | @gotags: bson:"request_status" | |
| createdAt | string | date-time | 否 | @gotags: bson:"created_at" create time stamp |
| modifiedAt | string | date-time | 否 | @gotags: bson:"modified_at" update time stamp |
| sourceDisplayName | string | 否 | 好友请求发起者名称 | |
| sourceIconUrl | string | 否 | 好友请求发起者头像地址 | |
| sourceRealmName | string | 否 | 好友请求发起者服务器名称 | |
| targetRealmName | string | 否 | 好友请求接受者服务器名称 | |
| targetDisplayName | string | 否 | 好友请求接受者名称 | |
| targetIconUrl | string | 否 | 好友请求接受者头像地址 | |
| sourceProperties | object | 否 | 好友请求发起者自定义信息 | |
| targetProperties | object | 否 | 好友请求接受者自定义信息 |
passportFriendRequestStatuse
标题: - Pending: 待处理
- Approved: 已同意
- Rejected: 已拒绝
- Expired: 已过期
- Revoked: 已取消
枚举值
| 枚举值 | 描述 |
|---|---|
Pending | - |
Approved | - |
Rejected | - |
Expired | - |
Revoked | - |
passportGetBlacklistPresenceResponse
标题: GetBlacklistPresenceResponse
获取黑名单角色在线信息响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| properties | object | 否 | 黑名单角色自定义信息 | |
| personaID | string | 否 | 黑名单角色的PersonaID | |
| realmID | string | 否 | 黑名单角色的RealmID | |
| status | string | 否 | 当前状态 |
模型示例
{
"status": "Online",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"personaID": "10000000054",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54"
}passportGetBlacklistPresencesListResponse
标题: GetBlacklistPresencesListResponse
获取黑名单角色在线信息列表响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| presencesList | object | 否 | 黑名单角色在线信息列表 |
模型示例
{
"propertiesList": {
"friendID1": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Online"
},
"friendID2": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Offline"
},
"friendID3": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Leave"
}
}
}passportGetBlacklistResponse
标题: GetBlockListResponse
获取黑名单列表响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| blacklists | array<passportBlacklist> | 否 | - | |
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
| total | integer | int64 | 否 | 总数 |
模型示例
{
"blacklist": [
{
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"createdAt": "2023-08-16T07:34:50.408Z",
"modifiedAt": "2023-08-16T07:34:50.408Z"
}
],
"start": 0,
"count": 20,
"total": 1
}passportGetFriendListResponse
标题: GetFriendListResponse
获取好友列表响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friends | array<passportFriendInfo> | 否 | 好友列表 | |
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
| total | integer | int64 | 否 | 总数 |
模型示例
{
"friends": [
{
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
],
"start": 0,
"count": 20,
"total": 1
}passportGetFriendPresenceResponse
标题: GetFriendPresenceResponse
获取好友在线信息响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| properties | object | 否 | 好友自定义信息 | |
| personaID | string | 否 | 好友的PersonaID | |
| realmID | string | 否 | 好友的RealmID | |
| status | string | 否 | 当前状态 |
模型示例
{
"status": "Online",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"personaID": "10000000054",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54"
}passportGetFriendPresencesListResponse
标题: GetFriendPresencesListResponse
获取用户在线信息列表响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| presencesList | object | 否 | 好友在线信息列表 |
模型示例
{
"propertiesList": {
"friendID1": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Online"
},
"friendID2": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Offline"
},
"friendID3": {
"properties": {
"key1": "val1",
"key2": "val3",
"key3": "val3"
},
"status": "Leave"
}
}
}passportGetFriendRequestListResponse
标题: GetFriendRequestListResponse
获取好友请求列表响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| requests | array<passportFriendRequest> | 否 | 好友请求列表 | |
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
| total | integer | int64 | 否 | 总数 |
模型示例
{
"requests": [
{
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
],
"start": 0,
"count": 20,
"total": 1
}passportGetFriendRequestResponse
标题: GetFriendRequestResponse
获取好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| request | passportFriendRequest | 否 | - |
模型示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}passportPersona
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| idDomainID | string | 是 | @gotags: bson:"id_domain_id" id domain user belongs to | |
| displayName | string | 否 | @gotags: bson:"display_name" id domain user belongs to | |
| personaID | string | 是 | @gotags: bson:"persona_id" persona id | |
| userID | string | 是 | @gotags: bson:"user_id" user id | |
| realmID | string | 是 | @gotags: bson:"realm_id" user id | |
| createdAt | string | date-time | 否 | @gotags: bson:"created_at" create time stamp |
| modifiedAt | string | date-time | 否 | @gotags: bson:"modified_at" update time stamp |
| status | passportPlayerStatuse | 否 | @gotags: bson:"status" update time stamp | |
| iconUrl | string | 否 | @gotags: bson:"icon_url" update time stamp | |
| properties | object | 否 | @gotags: bson:"properties" extra info | |
| systemProperties | object | 否 | @gotags: bson:"system_properties" system level custom info | |
| lastLogin | string | date-time | 否 | @gotags: bson:"last_login" persona last login time |
| banReason | string | 否 | @gotags: bson:"ban_reason" persona ban reason | |
| unbanAt | string | date-time | 否 | @gotags: bson:"unban_at" persona unban time stamp |
| externalPersonaID | string | 否 | @gotags: bson:"external_persona_id" external persona id | |
| publicProperties | object | 否 | @gotags: bson:"public_properties" public properties |
passportPlayerStatuse
标题: - Active: 正常
- Banned: 封禁
- Sealed: 归档/删除
枚举值
| 枚举值 | 描述 |
|---|---|
Active | - |
Banned | - |
Sealed | - |
passportRejectFriendRequestResponse
标题: RejectFriendRequestResponse
拒绝好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| request | passportFriendRequest | 否 | 好友请求信息 |
模型示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceProperties": {
"testKey": "testValue"
},
"targetProperties": {
"testKey": "testValue"
},
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}passportRemoveFriendPresenceResponse
passportRemoveFriendResponse
passportRevokeFriendRequestResponse
标题: CancelFriendRequestResponse
取消好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| request | passportFriendRequest | 否 | 好友请求信息 |
模型示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}passportSearchFriendsRandomlyRequest
标题: SearchFriendsRandomlyRequest
随机搜索好友请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| realmID | string | 否 | 目标Realm | |
| count | integer | int64 | 否 | 数量 |
| localRealm | boolean | 否 | 是否仅搜索同Realm下(如为true,则覆盖realmID内容) |
模型示例
{
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"count": 10,
"localRealm": false
}passportSearchFriendsRandomlyResponse
标题: SearchFriendsRandomlyResponse
随机搜索好友响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| personas | array<passportPersona> | 否 | 可添加好友列表 |
模型示例
{
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}passportSearchFriendsRequest
标题: SearchFriendsRequest
搜索好友请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| personaName | string | 否 | 目标名字(支持全称&模糊),长度限制为9个中文字符 | |
| realmID | string | 否 | 目标Realm | |
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
| personaID | string | 否 | 目标ID(只支持精确搜索) | |
| caseInsensitive | boolean | 否 | 目标名字大小写敏感 |
模型示例
{
"personaName": "我是一个角色",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"start": 0,
"count": 10,
"personaID": "10002321213"
}passportSearchFriendsResponse
标题: SearchFriendsResponse
搜索好友响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| personas | array<passportPersona> | 否 | 可添加好友列表 | |
| start | integer | int64 | 否 | 起始点 |
| count | integer | int64 | 否 | 数量 |
| total | integer | int64 | 否 | 总数 |
模型示例
{
"start": 0,
"count": 10,
"personas": [
{
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "string",
"personaID": "1000000001",
"userID": "10000000001",
"realmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"createdAt": "2023-08-16T08:13:48.289Z",
"modifiedAt": "2023-08-16T08:13:48.289Z",
"realmName": "exampleRealmName",
"status": "Active"
}
]
}passportSendFriendRequestRequest
标题: SendFriendRequestRequest
发送好友请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| targetPersonaID | string | 否 | 被请求者的PersonaID |
模型示例
{
"targetPersonaID": "10000000054"
}passportSendFriendRequestResponse
标题: SendFriendRequestResponse
发送好友请求响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| request | passportFriendRequest | 否 | - |
模型示例
{
"request": {
"id": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourceDisplayName": "Jack",
"sourceIconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"targetDisplayName": "Rose",
"targetIconUrl": "http://example.com/xx.png",
"idDomainID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"targetRealmID": "126da576-cf86-4a21-ab2b-865af8ba3a48",
"status": "Pending",
"createdAt": "2023-08-16T07:45:17.423Z",
"modifiedAt": "2023-08-16T07:45:17.423Z"
}
}passportSetFriendPresenceRequest
标题: SetFriendPresenceRequest
更新自定义信息(全量)请求
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| properties | object | 否 | 好友自定义信息 | |
| status | string | 否 | 当前状态 | |
| ttl | integer | int64 | 否 | 过期时间(单位:秒) |
模型示例
{
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"status": "Online",
"ttl": "30"
}passportSetFriendPresenceResponse
标题: SetFriendPresenceRequest
更新自定义信息(全量)响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| properties | object | 否 | 好友自定义信息 | |
| status | string | 否 | 当前状态 |
模型示例
{
"properties": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"status": "Online"
}passportUnblacklistUserResponse
passportUpdateFriendInfoResponse
标题: UpdateFriendInfoResponse
更新好友备注信息响应
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| friend | passportFriendInfo | 否 | - |
模型示例
{
"friend": {
"id": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"displayName": "Jack",
"iconUrl": "http://example.com/xx.png",
"sourceRealmName": "Titanic",
"targetRealmName": "Titanic",
"idDomainID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"sourcePersonaID": "10000000054",
"targetPersonaID": "10000000055",
"sourceRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"targetRealmID": "7bba5ff1-b4a3-498c-9c0b-24cad73cff54",
"Alias": "exampleAlias",
"createdAt": "2023-08-16T07:17:07.363Z",
"modifiedAt": "2023-08-16T07:17:07.364Z",
"customStatus": {
"customStatus": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
}
}protobufAny
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| @type | string | 否 | - |
rpcStatus
| 属性名 | 类型 | 格式 | 必填 | 说明 |
|---|---|---|---|---|
| code | integer | int32 | 否 | - |
| message | string | 否 | - | |
| details | array<protobufAny> | 否 | - |