Module: Slack::Web::Api::Endpoints::AppsManifest

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/apps_manifest.rb

Instance Method Summary collapse

Instance Method Details

#apps_manifest_create(options = {}) ⇒ Object

Create an app from an app manifest.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :manifest (manifest object as string)

    A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.

See Also:



16
17
18
19
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 16

def apps_manifest_create(options = {})
  throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
  post('apps.manifest.create', options)
end

#apps_manifest_delete(options = {}) ⇒ Object

Permanently deletes an app created through app manifests

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :app_id (Object)

    The ID of the app you want to delete.

See Also:



28
29
30
31
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 28

def apps_manifest_delete(options = {})
  throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
  post('apps.manifest.delete', options)
end

#apps_manifest_export(options = {}) ⇒ Object

Export an app manifest from an existing app

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :app_id (Object)

    The ID of the app whose configuration you want to export as a manifest.

See Also:



40
41
42
43
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 40

def apps_manifest_export(options = {})
  throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
  post('apps.manifest.export', options)
end

#apps_manifest_update(options = {}) ⇒ Object

Update an app from an app manifest

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :app_id (Object)

    The ID of the app whose configuration you want to update.

  • :manifest (manifest object as string)

    A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.

See Also:



54
55
56
57
58
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 54

def apps_manifest_update(options = {})
  throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
  throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
  post('apps.manifest.update', options)
end

#apps_manifest_validate(options = {}) ⇒ Object

Validate an app manifest

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :manifest (manifest object as string)

    The manifest to be validated. Will be validated against the app manifest schema - read our guide.

  • :app_id (Object)

    The ID of the app whose configuration you want to validate.

See Also:



69
70
71
72
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 69

def apps_manifest_validate(options = {})
  throw ArgumentError.new('Required arguments :manifest missing') if options[:manifest].nil?
  post('apps.manifest.validate', options)
end