From 7c6a06bd59bceed773bed7f64bf0ffd6c67af672 Mon Sep 17 00:00:00 2001 From: CuteReimu <415551921@qq.com> Date: Thu, 14 Mar 2024 19:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fav.go | 2 +- message.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fav.go b/fav.go index 15903dd..eb0ca90 100644 --- a/fav.go +++ b/fav.go @@ -192,7 +192,7 @@ func (c *Client) DeleteFavourResources(mediaId int, resources []Resource, platfo "csrf": biliJct, }) if len(platform) > 0 { - r.SetQueryParam("platform", platform) + r = r.SetQueryParam("platform", platform) } resp, err := r.Post("https://api.bilibili.com/x/v3/fav/resource/batch-del") if err != nil { diff --git a/message.go b/message.go index c05fecc..ba1ef56 100644 --- a/message.go +++ b/message.go @@ -232,10 +232,10 @@ func (c *Client) GetSessionMessages(talkerId, sessionType, size int, mobiApp str "session_type": strconv.Itoa(sessionType), }) if size != 0 { - r.SetQueryParam("size", strconv.Itoa(size)) + r = r.SetQueryParam("size", strconv.Itoa(size)) } if len(mobiApp) > 0 { - r.SetQueryParam("mobi_app", mobiApp) + r = r.SetQueryParam("mobi_app", mobiApp) } resp, err := r.Get("https://api.vc.bilibili.com/svr_sync/v1/svr_sync/fetch_session_msgs") if err != nil { @@ -310,7 +310,7 @@ func GetSessions(sessionType int, mobiApp string) (*SessionList, error) { func (c *Client) GetSessions(sessionType int, mobiApp string) (*SessionList, error) { r := c.resty().R().SetHeader("Content-Type", "application/x-www-form-urlencoded").SetQueryParam("session_type", strconv.Itoa(sessionType)) if len(mobiApp) > 0 { - r.SetQueryParam("mobi_app", mobiApp) + r = r.SetQueryParam("mobi_app", mobiApp) } resp, err := r.Get("https://api.vc.bilibili.com/session_svr/v1/session_svr/get_sessions") if err != nil {