deadblue/elevengo: A Golang API wrapper for 115 Cloud Storage Service.
2020-06-25 21:42:27 Author: github.com(查看原文) 阅读量:723 收藏

GoDoc

A Golang API wrapper for 115 NetDisk Service.

Example

import "github.com/deadblue/elevengo"

// Create agent
agent = elevengo.Default()

// Import credentials to login
cr = &elevengo.Credential{
    UID: "",
    CID: "",
    SEID: "",
}
if err := agent.CredentialImport(cr); err != nil {
    panic(err)
}

// List files under root.
for cursor := elevengo.FileCursor(); cursor.HasMore(); cursor.Next() {
    if files, err := agent.FileList("0", cursor); err != nil {
        panic(err)
    } else {
        // TODO: deal with the files
    }
}

You can find more example on GoDoc.

Features

  • Login
    • Import credential from cookies
    • Login via QRCode
    • Get signed in user information
    • Login via Account/Password (No idea)
  • File
    • List
    • Search
    • Rename
    • Move
    • Copy
    • Delete
    • Mkdir
    • Stat
    • Storage Stat
    • Download
    • Upload
    • Video HLS
  • Offline
    • List tasks
    • Create URL task(s)
    • Delete tasks
    • Clear tasks
  • Other
    • Captcha

TODO list

  • Handle more upstream errors.
  • Caller can swtich upstream API between HTTP/HTTPS.
  • Implement download/upload method, with progress echo.

License

MIT


文章来源: https://github.com/deadblue/elevengo
如有侵权请联系:admin#unsafe.sh