class Uploadcare::Client::FileListClient
API client for handling file lists
Public Instance Methods
batch_delete(uuids)
click to toggle source
Delete several files by list of uids @see uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesDelete uuids: Array
# File lib/uploadcare/client/file_list_client.rb, line 36 def batch_delete(uuids) body = uuids.to_json request_delete(uri: '/files/storage/', body: body) end
Also aliased as: delete_files
batch_store(uuids)
click to toggle source
Make a set of files “stored”. This will prevent them from being deleted automatically @see uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesStoring uuids: Array
# File lib/uploadcare/client/file_list_client.rb, line 26 def batch_store(uuids) body = uuids.to_json put(uri: '/files/storage/', body: body) end
Also aliased as: store_files
file_list(**options)
click to toggle source
Returns a pagination json of files stored in project @see uploadcare.com/api-refs/rest-api/v0.5.0/#operation/filesList
valid options: removed: [true|false] stored: [true|false] limit: (1..1000) ordering: [“datetime_uploaded”|“-datetime_uploaded”|“size”|“-size”] from: number of files skipped
# File lib/uploadcare/client/file_list_client.rb, line 18 def file_list(**options) query = options.empty? ? '' : '?' + URI.encode_www_form(options) get(uri: "/files/#{query}") end
Also aliased as: list