You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: pangea-sdk/service/share/api.go
+9-14
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,6 @@ type DeleteRequest struct {
74
74
75
75
IDstring`json:"id,omitempty"`// The ID of the object to delete.
76
76
Force*bool`json:"force,omitempty"`// If true, delete a folder even if it's not empty. Deletes the contents of folder as well.
77
-
Pathstring`json:"path,omitempty"`// The path of the object to delete.
78
77
BucketID*string`json:"bucket_id,omitempty"`// The bucket to use, if not the default.
79
78
}
80
79
@@ -128,8 +127,7 @@ func (e *share) Buckets(ctx context.Context) (*pangea.PangeaResponse[BucketsResu
128
127
129
128
// @summary Delete
130
129
//
131
-
// @description Delete object by ID or path. If both are supplied, the path must
132
-
// match that of the object represented by the ID.
130
+
// @description Delete object by ID.
133
131
//
134
132
// @operationId store_post_v1_delete
135
133
//
@@ -150,7 +148,7 @@ type FolderCreateRequest struct {
150
148
Namestring`json:"name,omitempty"`// The name of an object.
151
149
MetadataMetadata`json:"metadata,omitempty"`// A set of string-based key/value pairs used to provide additional data about an object.
152
150
ParentIDstring`json:"parent_id,omitempty"`// The ID of a stored object.
153
-
Pathstring`json:"path,omitempty"`// An case-sensitive path to an object. Contains a sequence of path segments delimited by the the / character. Any path ending in a / character refers to a folder.
151
+
Folderstring`json:"folder,omitempty"`// The folder to place the folder in. Must match `parent_id` if also set.
154
152
TagsTags`json:"tags,omitempty"`// A list of user-defined tags
155
153
BucketID*string`json:"bucket_id,omitempty"`// The bucket to use, if not the default.
156
154
}
@@ -173,7 +171,7 @@ type FolderCreateResult struct {
IDstring`json:"id,omitempty"`// The ID of the object to retrieve.
189
-
Pathstring`json:"path,omitempty"`// The path of the object to retrieve.
190
187
Password*string`json:"password,omitempty"`// If the file was protected with a password, the password to decrypt with.
191
188
TransferMethod pangea.TransferMethod`json:"transfer_method,omitempty"`// The requested transfer method for the file data.
192
189
BucketID*string`json:"bucket_id,omitempty"`// The bucket to use, if not the default.
@@ -199,16 +196,14 @@ type GetResult struct {
199
196
200
197
// @summary Get an object
201
198
//
202
-
// @description Get object. If both ID and path are supplied, the call will fail
203
-
// if the target object doesn't match both properties.
199
+
// @description Get object.
204
200
//
205
201
// @operationId store_post_v1_get
206
202
//
207
203
// @example
208
204
//
209
205
// input := &share.GetRequest{
210
206
// ID: "pos_3djfmzg2db4c6donarecbyv5begtj2bm",
211
-
// Path: "/",
212
207
// }
213
208
//
214
209
// res, err := shareClient.Get(ctx, input)
@@ -230,7 +225,7 @@ type PutRequest struct {
230
225
MetadataMetadata`json:"metadata,omitempty"`// A set of string-based key/value pairs used to provide additional data about an object.
231
226
MimeTypestring`json:"mimetype,omitempty"`// The MIME type of the file, which will be verified by the server if provided. Uploads not matching the supplied MIME type will be rejected.
232
227
ParentIDstring`json:"parent_id,omitempty"`// The parent ID of the object (a folder). Leave blank to keep in the root folder.
233
-
Pathstring`json:"path,omitempty"`// An optional path where the file should be placed. It will auto-create directories if necessary.
228
+
Folderstring`json:"folder,omitempty"`// The path to the parent folder. Leave blank for the root folder. Path must resolve to `parent_id` if also set.
234
229
Passwordstring`json:"password,omitempty"`// An optional password to protect the file with. Downloading the file will require this password.
235
230
PasswordAlgorithmstring`json:"password_algorithm,omitempty"`// An optional password algorithm to protect the file with. See symmetric vault password_algorithm.
236
231
SHA1string`json:"sha1,omitempty"`// The hexadecimal-encoded SHA1 hash of the file data, which will be verified by the server if provided.
IDstring`json:"id"`// An identifier for the file to update.
306
-
Pathstring`json:"path,omitempty"`// An alternative to ID for identifying the target file.
301
+
Folderstring`json:"folder,omitempty"`// Set the parent (folder). Leave blank for the root folder. Path must resolve to `parent_id` if also set.
307
302
BucketID*string`json:"bucket_id,omitempty"`// The bucket to use, if not the default.
308
303
AddMetadataMetadata`json:"add_metadata,omitempty"`// A list of Metadata key/values to set in the object. If a provided key exists, the value will be replaced.
309
304
AddPasswordstring`json:"add_password,omitempty"`// Protect the file with the supplied password.
0 commit comments