2023-06-23 17:36:40 +08:00
package dropbox
import (
2025-06-12 22:02:46 +08:00
"github.com/OpenListTeam/OpenList/internal/driver"
"github.com/OpenListTeam/OpenList/internal/op"
2023-06-23 17:36:40 +08:00
)
const (
DefaultClientID = "76lrwrklhdn1icb"
)
type Addition struct {
RefreshToken string ` json:"refresh_token" required:"true" `
driver . RootPath
2025-06-15 23:19:25 +08:00
OauthTokenURL string ` json:"oauth_token_url" default:"https://api.example.com/alist/dropbox/token" ` // TODO: Replace this with a community hosted api endpoint
2023-06-23 17:36:40 +08: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" `
2024-01-24 18:03:50 +09:00
AccessToken string
RootNamespaceId string
2023-06-23 17:36:40 +08:00
}
var config = driver . Config {
Name : "Dropbox" ,
LocalSort : false ,
OnlyLocal : false ,
OnlyProxy : false ,
NoCache : false ,
NoUpload : false ,
NeedMs : false ,
DefaultRoot : "" ,
NoOverwriteUpload : true ,
}
func init ( ) {
op . RegisterDriver ( func ( ) driver . Driver {
return & Dropbox {
base : "https://api.dropboxapi.com" ,
contentBase : "https://content.dropboxapi.com" ,
}
} )
}