From bf5c8d23f3c28829f482aed0f60f1e1071e5d237 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, 17 Jun 2024 11:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A4=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/user.go b/user.go index 21bbae9..0ce07a2 100644 --- a/user.go +++ b/user.go @@ -409,3 +409,26 @@ func (c *Client) FansSendMessage(param FansSendMessageParam) (*FansSendMessageRe ) return execute[*FansSendMessageResult](c, method, url, param, fillCsrf(c)) } + +type BatchGetUserCardsParam struct { + Uids []int `json:"uids"` // 目标用户的UID列表 +} + +type BatchGetUserCardsResult struct { + Mid int `json:"mid"` // mid + Name string `json:"name"` // 昵称 + Face string `json:"face"` // 头像链接 + Sign string `json:"sign"` // 签名 + Rank int `json:"rank"` // 用户权限等级 + Level int `json:"level"` // 当前等级。0-6 级 + Silence int `json:"silence"` // 封禁状态。0:正常。1:被封 +} + +// BatchGetUserCards 获取多用户详细信息 +func (c *Client) BatchGetUserCards(param BatchGetUserCardsParam) ([]*BatchGetUserCardsResult, error) { + const ( + method = resty.MethodGet + url = "https://api.vc.bilibili.com/account/v1/user/cards" + ) + return execute[[]*BatchGetUserCardsResult](c, method, url, param) +}