# README
ElevenGo
An API client of 115 Cloud Storage Service.
Example
High-level API
package main
import (
"github.com/deadblue/elevengo"
"log"
)
func main() {
// Initialize agent
agent := elevengo.Default()
// Import credential
credential := &elevengo.Credential{
UID: "", CID: "", KID: "", SEID: "",
}
if err := agent.CredentialImport(credential); err != nil {
log.Fatalf("Import credentail error: %s", err)
}
// Iterate files under specific directory
if it, err := agent.FileIterate("dirId"); err != nil {
log.Fatalf("Iterate files error: %s", err)
} else {
log.Printf("Total files: %d", it.Count())
for index, file := range it.Items() {
log.Printf("%d => %#v", index, file)
}
}
}
Low-level API
package main
import (
"context"
"log"
"github.com/deadblue/elevengo"
"github.com/deadblue/elevengo/lowlevel/api"
)
func main() {
// Initialize agent
agent := elevengo.Default()
// Import credential
credential := &elevengo.Credential{
UID: "", CID: "", KID: "", SEID: "",
}
if err := agent.CredentialImport(credential); err != nil {
log.Fatalf("Import credentail error: %s", err)
}
// Get low-level API client
llc := agent.LowlevelClient()
// Init FileList API spec
spec := (&api.FiieListSpec{}).Init("dirId", 0, 32)
// Call API
if err = llc.CallApi(spec, context.Background()); err != nil {
log.Fatalf("Call API error: %s", err)
}
// Parse API result
for index, file := range spec.Result.Files {
log.Printf("File: %d => %v", index, file)
}
}
License
MIT
# Functions
Default creates an Agent with default settings.
New creates Agent with customized options.
RangeFirst makes a Range parameter to request the first `length` bytes.
RangeLast makes a Range parameter to request the last `length` bytes.
RangeMiddle makes a Range parameter to request content starts from `offset`, and has `length` bytes (at most).
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Another 1080P, what the fuck?.
4K Definition, aka.
Full-HD, aka.
High Definition, aka.
The fallback definition, usually for non-standard resolution.
Standard Definition, aka.
# Variables
No description provided by the author
# Structs
Agent holds signed-in user's credentials, and provides methods to access upstream server's features, such as file management, offline download, etc.
Credential contains required information which 115 server uses to authenticate a signed-in user.
DownloadTicket contains all required information to download a file.
No description provided by the author
File describe a file or directory on cloud storage.
ImportTicket container reqiured fields to import(aka.
No description provided by the author
OfflineTask describe an offline downloading task.
QrcodeSession holds the information during a QRCode login process.
Range is used in Agent.GetRange().
StorageInfo describes storage space usage.
UploadOssTicket contains all required paramters to upload a file through aliyun-oss-sdk(https://github.com/aliyun/aliyun-oss-go-sdk).
UploadTicket contains all required information to upload a file.
UserInfo contains the basic information of a signed-in user.
VideoTicket contains all required arguments to play a cloud video.
# Interfaces
Iterator iterate items.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
VideoDefinition values from 115.