From f678f1935bc4ffbad4b7a2fce86d77f7f82a08cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E8=91=A9=E3=81=AE=E7=81=B5=E6=A2=A6?= Date: Mon, 7 Oct 2024 13:58:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9F=A5=E8=AF=A2=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8E=E8=87=AA=E5=B7=B1=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/user.go b/user.go index 223eb77..3c24fab 100644 --- a/user.go +++ b/user.go @@ -717,3 +717,16 @@ func (c *Client) GetUserRelation2(param GetUserRelation2Param) (*GetUserRelation ) return execute[*GetUserRelation2Result](c, method, url, param, fillWbiHandler(c.wbi, c.GetCookies())) } + +type BatchGetUserRelationParam struct { + Fids []int `json:"fids"` // 目标用户 mid +} + +// BatchGetUserRelation 批量查询用户与自己关系 +func (c *Client) BatchGetUserRelation(param BatchGetUserRelationParam) (map[int]*RelationDetail, error) { + const ( + method = resty.MethodGet + url = "https://api.bilibili.com/x/relation/relations" + ) + return execute[map[int]*RelationDetail](c, method, url, param) +}