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 (string)

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

  • :team_id (string)

    When called with an org token, which specific team to create app on.

Raises:

  • (ArgumentError)

See Also:



18
19
20
21
22
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 18

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

#apps_manifest_delete(options = {}) ⇒ Object

Permanently deletes an app created through app manifests. When called with a manager app token, this method can only delete apps that were created by that manager app.

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.

Raises:

  • (ArgumentError)

See Also:



31
32
33
34
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 31

def apps_manifest_delete(options = {})
  raise ArgumentError, '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. When called with a manager app token, this method can only export apps that were created by that manager 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.

Raises:

  • (ArgumentError)

See Also:



43
44
45
46
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 43

def apps_manifest_export(options = {})
  raise ArgumentError, '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. When called with a manager app token, this method can only update apps that were created by that manager app.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :manifest (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.

  • :app_id (Object)

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

Raises:

  • (ArgumentError)

See Also:



57
58
59
60
61
62
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 57

def apps_manifest_update(options = {})
  raise ArgumentError, 'Required arguments :manifest missing' if options[:manifest].nil?
  raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
  options = encode_options_as_json(options, %i[manifest])
  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 (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.

Raises:

  • (ArgumentError)

See Also:



73
74
75
76
# File 'lib/slack/web/api/endpoints/apps_manifest.rb', line 73

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