好友管理

请求加为好友


向其他用户发送好友申请。收件人将收到该请求的通知。

Request

POST
url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/request
Header : 'content-type: application/json'
Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx'
Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx'
data:
{
    "userId": "80803902-8b83-4860-b8a6-xxxxxxxx",
    "friendId": "a1c4aaa2-02f6-40bd-afb4-xxxxxxx",
    "message": "做朋友吧!!"
}

Header

Type

Required

Description

X-API-KEY

String

O

GamePot发放的认证密钥

X-PROJECT-ID

String

O

仪表盘项目ID

Attribute

Type

Required

Description

userId

String

O

用户ID

friendId

String

O

添加好友ID

message

String

X

消息

Response

成功

Attribute

Type

Description

friendship.project_id

String

项目ID

friendship.id

String

输入ID

friendship.user_id

String

用户ID

friendship.status

String

状态

friendship.user_id

String

ID

friendship.user

Object

我的信息

friendship.friend_id

String

好友ID

friendship.friend

Object

好友信息

friendship.requested_at

String

请求日期

失败

Attribute

Type

Description

code

Int

结果值(1:成功,失败时请参考Error code)

error

String

错误内容

同意好友申请


同意对方发送的好友申请。同意后两用户成为好友关系。

Request

Header

Type

Required

Description

X-API-KEY

String

O

GamePot发放的认证密钥

X-PROJECT-ID

String

O

仪表盘项目ID

Attribute

Type

Required

Description

userId

String

O

用户ID

friendId

String

O

添加好友ID

Response

成功

Attribute

Type

Description

friendship.project_id

String

项目ID

friendship.id

String

输入ID

friendship.user_id

String

用户ID

friendship.status

String

状态

friendship.user_id

String

ID

friendship.friend_id

String

好友ID

friendship.user

Object

我的信息

friendship.friend

Object

好友信息

friendship.requested_at

String

请求日期

失败

Attribute

Type

Description

code

Int

结果值(1:成功,失败时请参考Error code)

error

String

错误内容

拒绝好友


拒绝对方发来的好友申请。

Request

Header

Type

Required

Description

X-API-KEY

String

O

GamePot发放的认证密钥

X-PROJECT-ID

String

O

仪表盘项目ID

Attribute

Type

Required

Description

userId

String

O

用户ID

friendId

String

O

添加好友ID

Response

成功

Attribute

Type

Description

friendship.project_id

String

项目ID

friendship.id

String

输入ID

friendship.user_id

String

ID

friendship.friend_id

String

好友ID

friendship.status

String

状态

friendship.user

Object

我的信息

friendship.friend

Object

好友信息

friendship.requested_at

String

请求日期

失败

Attribute

Type

Description

code

Int

结果值(1:成功,失败时参考错误代码)

error

String

错误内容

解除好友


此功能可以取消与其他用户的好友关系。解除好友功能是将相应用户在当事人的好友列表中移除。若当事人想再次与取消的好友成为好友关系,需要重新发送好友申请。

Request

Header

Type

Required

Description

X-API-KEY

String

O

GamePot发放的认证密钥

X-PROJECT-ID

String

O

仪表盘项目ID

Attribute

Type

Required

Description

userId

String

O

用户ID

friendId

String

O

添加好友ID

Response

成功

Attribute

Type

Description

friendship.project_id

String

项目ID

friendship.id

String

输入ID

friendship.status

String

状态

friendship.user_id

String

ID

friendship.friend_id

String

好友ID

friendship.user

Object

我的信息

friendship.friend

Object

好友信息

friendship.requested_at

String

请求日期

失败

Attribute

Type

Description

code

Int

结果值(1:成功,失败时请参考Error code)

error

String

错误内容

好友列表


显示当前好友列表。

Request

Header

Type

Required

Description

X-API-KEY

String

O

GamePot发放的认证密钥

X-PROJECT-ID

String

O

仪表盘项目ID

Attribute

Type

Required

Description

filter

String

O

可通过过滤器搜索所有字段。

user_id

String

O

用户ID

过滤器可通过代码进行多种应用。 Status 可以根据代码搜索好友列表。

"accepted":已接受邀请成为好友的列表

"rejected":拒绝邀请的列表

"requested":请求交友的列表

"pending":已同意交友请求的列表

Response

成功

Attribute

Type

Description

project_id

String

项目ID

id

String

固有ID

status

String

状态

user_id

String

ID

friend_id

String

好友ID

user

Object

我的信息

friend

Object

好友信息

created_at

String

创建日期

updated_at

String

更新日期

requested_at

String

请求日期

失败

Attribute

Type

Description

code

Int

结果值(1:成功,失败时请参考Error code)

error

String

错误内容

Last updated