adapt WebPanClient naming

This commit is contained in:
tickstep 2024-03-03 14:07:35 +08:00
parent b79cd7bafb
commit d83f87942c
2 changed files with 6 additions and 6 deletions

View File

@ -9,20 +9,20 @@ type (
// PanClient 云盘客户端 // PanClient 云盘客户端
PanClient struct { PanClient struct {
// 网页WEB接口客户端 // 网页WEB接口客户端
webapiPanClient *aliyunpan_web.PanClient webapiPanClient *aliyunpan_web.WebPanClient
// 阿里openapi接口客户端 // 阿里openapi接口客户端
openapiPanClient *aliyunpan_open.OpenPanClient openapiPanClient *aliyunpan_open.OpenPanClient
} }
) )
func NewPanClient(webClient *aliyunpan_web.PanClient, openClient *aliyunpan_open.OpenPanClient) *PanClient { func NewPanClient(webClient *aliyunpan_web.WebPanClient, openClient *aliyunpan_open.OpenPanClient) *PanClient {
return &PanClient{ return &PanClient{
webapiPanClient: webClient, webapiPanClient: webClient,
openapiPanClient: openClient, openapiPanClient: openClient,
} }
} }
func (p *PanClient) WebapiPanClient() *aliyunpan_web.PanClient { func (p *PanClient) WebapiPanClient() *aliyunpan_web.WebPanClient {
return p.webapiPanClient return p.webapiPanClient
} }
@ -30,7 +30,7 @@ func (p *PanClient) OpenapiPanClient() *aliyunpan_open.OpenPanClient {
return p.openapiPanClient return p.openapiPanClient
} }
func (p *PanClient) UpdateClient(openClient *aliyunpan_open.OpenPanClient, webClient *aliyunpan_web.PanClient) { func (p *PanClient) UpdateClient(openClient *aliyunpan_open.OpenPanClient, webClient *aliyunpan_web.WebPanClient) {
p.webapiPanClient = webClient p.webapiPanClient = webClient
p.openapiPanClient = openClient p.openapiPanClient = openClient
} }

View File

@ -163,7 +163,7 @@ doWebLoginAct:
// setup webapi client // setup webapi client
var webUserInfo *aliyunpan.UserInfo var webUserInfo *aliyunpan.UserInfo
var err2 *apierror.ApiError var err2 *apierror.ApiError
var webPanClient *aliyunpan_web.PanClient var webPanClient *aliyunpan_web.WebPanClient
if webapiToken != nil && webapiToken.AccessToken != "" { if webapiToken != nil && webapiToken.AccessToken != "" {
appConfig := aliyunpan_web.AppConfig{ appConfig := aliyunpan_web.AppConfig{
AppId: "25dzX3vbYqktVxyX", AppId: "25dzX3vbYqktVxyX",
@ -172,7 +172,7 @@ doWebLoginAct:
Nonce: 0, Nonce: 0,
PublicKey: "", PublicKey: "",
} }
webPanClient = aliyunpan_web.NewPanClient(aliyunpan_web.WebLoginToken{ webPanClient = aliyunpan_web.NewWebPanClient(aliyunpan_web.WebLoginToken{
AccessTokenType: "Bearer", AccessTokenType: "Bearer",
AccessToken: webapiToken.AccessToken, AccessToken: webapiToken.AccessToken,
RefreshToken: "", RefreshToken: "",