Class: MintPress::SlackBot::Client

Inherits:
Object
  • Object
show all
Includes:
MintLogger
Defined in:
src/mintpress-slackbot/lib/mintpress-slackbot/slackbot/client.rb

Properties (Read/Write)

Properties (Read Only)

Constant Summary collapse

PROPERTIES =
%i[api_url api_token app_id client_id client_secret signing_secret verification_token approval_channel verify_ssl timeout api_url admin_users privileged_actions action_list allowed_launch_templates]
DEFAULTS =
{
  api_url: 'https://api.slack.com/api',
  action_list: %w[provision destroy patch startup shutdown],
  privileged_actions: %w[provision destroy patch],
  allowed_launch_templates: [],
  admin_users: [],
  timeout: 300,
  verify_ssl: true
}

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.

Instance Attribute Details

#action_listObject (readonly)

Returns the value of attribute action_list.

#admin_usersObject (readonly)

Returns the value of attribute admin_users.

#allowed_launch_templatesObject (readonly)

Returns the value of attribute allowed_launch_templates.

#api_tokenObject (readonly)

Returns the value of attribute api_token.

#api_urlObject (readonly)

Returns the value of attribute api_url.

#app_idObject (readonly)

Returns the value of attribute app_id.

#approval_channelObject (readonly)

Returns the value of attribute approval_channel.

#client_idObject (readonly)

Returns the value of attribute client_id.

#client_secretObject (readonly)

Returns the value of attribute client_secret.

#consoleObject (readonly)

Returns the value of attribute console.

#privileged_actionsObject (readonly)

Returns the value of attribute privileged_actions.

#signing_secretObject (readonly)

Returns the value of attribute signing_secret.

#verification_tokenObject (readonly)

Returns the value of attribute verification_token.

Instance Method Details

#full_url(path) ⇒ Object

#http(path, **args) ⇒ Object

#http_delete(path) ⇒ Object

#http_get(url) ⇒ Object

#http_patch(path, payload = nil) ⇒ Object

#http_post(path, payload) ⇒ Object

#http_put(path, payload = nil) ⇒ Object

#raise_http_exception(caught_exception, path) ⇒ Object

Raises:

  • (exception)

#request_headers(opts = {}) ⇒ Object

#slackbotObject

Slack Client

#valid_uri?(uri) ⇒ Boolean

Returns:

  • (Boolean)

#validate_client_options!Object

client methods

Raises:

  • (ArgumentError)