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
19 20 21 22 23 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 19 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
35 36 37 38 39 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 35 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
51 52 53 54 55 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 51 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
72 73 74 75 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 72 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
87 88 89 90 91 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 87 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
103 104 105 106 107 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 103 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.
119 120 121 122 123 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 119 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
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 144 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.
165 166 167 168 169 |
# File 'lib/slack/web/api/endpoints/apps_datastore.rb', line 165 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 |