MCPcopy Create free account
hub / github.com/Mrs4s/six-cli / AddOfflineTask

Method AddOfflineTask

six_cloud/user.go:128–134  ·  view source on GitHub ↗
(hash, path string)

Source from the content-addressed store, hash-verified

126}
127
128func (user *SixUser) AddOfflineTask(hash, path string) error {
129 info := gjson.Parse(user.Client.PostJsonObject("https://api.2dland.cn/v3/offline/add", models.B{"task": []models.B{{"hash": hash}}, "savePath": path}))
130 if info.Get("successCount").Int() != 1 {
131 return errors.New("unsuccessful")
132 }
133 return nil
134}
135
136func (user *SixUser) CreateUploadTree(remote string, files []string) map[string]string {
137 res := make(map[string]string)

Callers 1

OfflineMethod · 0.80

Calls 1

PostJsonObjectMethod · 0.80

Tested by

no test coverage detected