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 struct {
// 网页WEB接口客户端
webapiPanClient *aliyunpan_web.PanClient
webapiPanClient *aliyunpan_web.WebPanClient
// 阿里openapi接口客户端
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{
webapiPanClient: webClient,
openapiPanClient: openClient,
}
}
func (p *PanClient) WebapiPanClient() *aliyunpan_web.PanClient {
func (p *PanClient) WebapiPanClient() *aliyunpan_web.WebPanClient {
return p.webapiPanClient
}
@ -30,7 +30,7 @@ func (p *PanClient) OpenapiPanClient() *aliyunpan_open.OpenPanClient {
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.openapiPanClient = openClient
}

View File

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