Class: Uploadcare::Rails::Api::Rest::FileMetadataApi
- Defined in:
- lib/uploadcare/rails/api/rest/file_metadata_api.rb
Overview
A class that contains FileMetadata related methods for Uploadcare REST API
Class Method Summary collapse
-
.delete_file_metadata(uuid, key) ⇒ Object
Delete a file’s metadata key.
-
.file_metadata(uuid) ⇒ Object
Get file’s metadata keys and values.
-
.file_metadata_value(uuid, key) ⇒ Object
Get the value of a single metadata key.
-
.update_file_metadata(uuid, key, value) ⇒ Object
Update the value of a single metadata key.
Class Method Details
.delete_file_metadata(uuid, key) ⇒ Object
Delete a file’s metadata key
32 33 34 |
# File 'lib/uploadcare/rails/api/rest/file_metadata_api.rb', line 32 def (uuid, key) Uploadcare::FileMetadata.delete(uuid, key) end |
.file_metadata(uuid) ⇒ Object
Get file’s metadata keys and values
14 15 16 |
# File 'lib/uploadcare/rails/api/rest/file_metadata_api.rb', line 14 def (uuid) Uploadcare::FileMetadata.index(uuid) end |
.file_metadata_value(uuid, key) ⇒ Object
Get the value of a single metadata key
20 21 22 |
# File 'lib/uploadcare/rails/api/rest/file_metadata_api.rb', line 20 def (uuid, key) Uploadcare::FileMetadata.show(uuid, key) end |
.update_file_metadata(uuid, key, value) ⇒ Object
Update the value of a single metadata key. If the key does not exist, it will be created
26 27 28 |
# File 'lib/uploadcare/rails/api/rest/file_metadata_api.rb', line 26 def (uuid, key, value) Uploadcare::FileMetadata.update(uuid, key, value) end |