Module: Slack::Web::Api::Endpoints::AppsDatastore
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/apps_datastore.rb
Instance Method Summary collapse
-
#apps_datastore_bulkDelete(options = {}) ⇒ Object
Delete items from a datastore in bulk.
-
#apps_datastore_bulkGet(options = {}) ⇒ Object
Get items from a datastore in bulk.
-
#apps_datastore_bulkPut(options = {}) ⇒ Object
Creates or replaces existing items in bulk.
-
#apps_datastore_count(options = {}) ⇒ Object
Count the number of items in a datastore that match a query.
-
#apps_datastore_delete(options = {}) ⇒ Object
Delete an item from a datastore.
-
#apps_datastore_get(options = {}) ⇒ Object
Get an item from a datastore.
-
#apps_datastore_put(options = {}) ⇒ Object
Creates a new item, or replaces an old item with a new item.
-
#apps_datastore_query(options = {}) ⇒ Object
Query a datastore for items.
-
#apps_datastore_update(options = {}) ⇒ Object
Edits an existing item’s attributes, or adds a new item if it does not already exist.
Instance Method Details
#apps_datastore_bulkDelete(options = {}) ⇒ Object
Delete items from a datastore in bulk
20 21 22 23 24 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 20 def apps_datastore_bulkDelete( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :ids missing' if [:ids].nil? post('apps.datastore.bulkDelete', ) end |
#apps_datastore_bulkGet(options = {}) ⇒ Object
Get items from a datastore in bulk
37 38 39 40 41 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 37 def apps_datastore_bulkGet( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :ids missing' if [:ids].nil? post('apps.datastore.bulkGet', ) end |
#apps_datastore_bulkPut(options = {}) ⇒ Object
Creates or replaces existing items in bulk
54 55 56 57 58 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 54 def apps_datastore_bulkPut( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :items missing' if [:items].nil? post('apps.datastore.bulkPut', ) end |
#apps_datastore_count(options = {}) ⇒ Object
Count the number of items in a datastore that match a query
75 76 77 78 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 75 def apps_datastore_count( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? post('apps.datastore.count', ) end |
#apps_datastore_delete(options = {}) ⇒ Object
Delete an item from a datastore
91 92 93 94 95 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 91 def apps_datastore_delete( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :id missing' if [:id].nil? post('apps.datastore.delete', ) end |
#apps_datastore_get(options = {}) ⇒ Object
Get an item from a datastore
108 109 110 111 112 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 108 def apps_datastore_get( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :id missing' if [:id].nil? post('apps.datastore.get', ) end |
#apps_datastore_put(options = {}) ⇒ Object
Creates a new item, or replaces an old item with a new item.
125 126 127 128 129 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 125 def apps_datastore_put( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :item missing' if [:item].nil? post('apps.datastore.put', ) end |
#apps_datastore_query(options = {}) ⇒ Object
Query a datastore for items
150 151 152 153 154 155 156 157 158 159 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 150 def apps_datastore_query( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? if block_given? Pagination::Cursor.new(self, :apps_datastore_query, ).each do |page| yield page end else post('apps.datastore.query', ) end end |
#apps_datastore_update(options = {}) ⇒ Object
Edits an existing item’s attributes, or adds a new item if it does not already exist.
172 173 174 175 176 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 172 def apps_datastore_update( = {}) raise ArgumentError, 'Required arguments :datastore missing' if [:datastore].nil? raise ArgumentError, 'Required arguments :item missing' if [:item].nil? post('apps.datastore.update', ) end |