All Projects → chyroc → go-aliyundrive

chyroc / go-aliyundrive

Licence: Apache-2.0 license
阿里云盘 Go SDK

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go-aliyundrive

aliyundrive-webdav
阿里云盘 WebDAV 服务
Stars: ✭ 5,371 (+9322.81%)
Mutual labels:  aliyundrive
aligo
🔥简单、易用、可扩展的阿里云盘 API 接口库🚀
Stars: ✭ 429 (+652.63%)
Mutual labels:  aliyunpan

go-aliyundrive

阿里云盘 Go SDK

安装

go get github.com/chyroc/go-aliyundrive

使用

初始化 SDK 实例

ins := aliyundrive.New()

// 下面所有提到的 ins 都是指这个实例

登录

具体代码参考这里

user, err := ins.Auth.LoginByQrcode(context.TODO())

读取文件

具体代码参考这里

resp, err := ins.File.GetFileList(context.TODO(), &aliyundrive.GetFileListReq{
    DriveID:      driveID,
    ParentFileID: parentID,
    Marker:       next,
})

获取分享的内容

具体代码参考这里

sharedInfo, err := ins.ShareLink.GetShareByAnonymous(ctx, &aliyundrive.GetShareByAnonymousReq{
    ShareID: shareID,
})

其他

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].