Class: Uploadcare::Rails::Api::Rest::GroupApi
- Defined in:
- lib/uploadcare/rails/api/rest/group_api.rb
Overview
A class that contains Group related methods for Uploadcare REST API
Class Method Summary collapse
-
.create_group(files, options = {}) ⇒ Object
Create files group from a set of files by using their UUIDs.
-
.delete_group(uuid) ⇒ Object
Delete a file group by its ID.
-
.get_group(uuid) ⇒ Object
Get group info.
-
.get_groups(options = {}) ⇒ Object
Returns paginated list of groups valid options: limit: (1..1000) ordering: [“datetime_created”|“-datetime_created”] from: A starting point for filtering group lists.
-
.store_group(uuid) ⇒ Object
Stores all files in a group.
Class Method Details
.create_group(files, options = {}) ⇒ Object
Create files group from a set of files by using their UUIDs.
44 45 46 |
# File 'lib/uploadcare/rails/api/rest/group_api.rb', line 44 def create_group(files, = {}) Uploadcare::Group.create(files, ) end |
.delete_group(uuid) ⇒ Object
Delete a file group by its ID.
38 39 40 |
# File 'lib/uploadcare/rails/api/rest/group_api.rb', line 38 def delete_group(uuid) Uploadcare::Group.delete(uuid) end |
.get_group(uuid) ⇒ Object
Get group info
26 27 28 |
# File 'lib/uploadcare/rails/api/rest/group_api.rb', line 26 def get_group(uuid) Uploadcare::Group.info(uuid) end |
.get_groups(options = {}) ⇒ Object
Returns paginated list of groups valid options: limit: (1..1000) ordering: [“datetime_created”|“-datetime_created”] from: A starting point for filtering group lists. MUST be a datetime value with T used as a separator.
example: '2015-01-02T10:00:00'
20 21 22 |
# File 'lib/uploadcare/rails/api/rest/group_api.rb', line 20 def get_groups( = {}) Uploadcare::GroupList.list() end |
.store_group(uuid) ⇒ Object
Stores all files in a group
32 33 34 |
# File 'lib/uploadcare/rails/api/rest/group_api.rb', line 32 def store_group(uuid) Uploadcare::Group.store(uuid) end |