2023-02-23 12:45:57 +00:00
|
|
|
package aliyundrive_open
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
|
|
|
"github.com/alist-org/alist/v3/internal/op"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Addition struct {
|
|
|
|
driver.RootID
|
|
|
|
RefreshToken string `json:"refresh_token" required:"true"`
|
|
|
|
OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
|
|
|
|
OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
|
|
|
|
OauthTokenURL string `json:"oauth_token_url" default:"https://api.nn.ci/alist/ali_open/token"`
|
2023-02-23 14:00:17 +00:00
|
|
|
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
|
|
|
|
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
|
2023-03-08 11:19:13 +00:00
|
|
|
RemoveWay string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
|
2023-03-29 12:26:21 +00:00
|
|
|
InternalUpload bool `json:"internal_upload" help:"If you are using Aliyun ECS is located in Beijing, you can turn it on to boost the upload speed"`
|
2023-03-20 07:00:02 +00:00
|
|
|
AccessToken string
|
2023-02-23 12:45:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
2023-03-05 07:36:12 +00:00
|
|
|
Name: "AliyundriveOpen",
|
|
|
|
LocalSort: false,
|
|
|
|
OnlyLocal: false,
|
|
|
|
OnlyProxy: false,
|
|
|
|
NoCache: false,
|
|
|
|
NoUpload: false,
|
|
|
|
NeedMs: false,
|
|
|
|
DefaultRoot: "root",
|
|
|
|
NoOverwriteUpload: true,
|
2023-02-23 12:45:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
op.RegisterDriver(func() driver.Driver {
|
|
|
|
return &AliyundriveOpen{
|
|
|
|
base: "https://open.aliyundrive.com",
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|