Class: MintPress::SlackBot::Client
- Inherits:
-
Object
- Object
- MintPress::SlackBot::Client
- 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
-
#action_list ⇒ Object
readonly
Returns the value of attribute action_list.
-
#admin_users ⇒ Object
readonly
Returns the value of attribute admin_users.
-
#allowed_launch_templates ⇒ Object
readonly
Returns the value of attribute allowed_launch_templates.
-
#api_token ⇒ Object
readonly
Returns the value of attribute api_token.
-
#api_url ⇒ Object
readonly
Returns the value of attribute api_url.
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#approval_channel ⇒ Object
readonly
Returns the value of attribute approval_channel.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#console ⇒ Object
readonly
Returns the value of attribute console.
-
#privileged_actions ⇒ Object
readonly
Returns the value of attribute privileged_actions.
-
#signing_secret ⇒ Object
readonly
Returns the value of attribute signing_secret.
-
#verification_token ⇒ Object
readonly
Returns the value of attribute verification_token.
Instance Method Summary collapse
- #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
-
#initialize(opts = {}) ⇒ Client
constructor
A new instance of Client.
- #raise_http_exception(caught_exception, path) ⇒ Object
- #request_headers(opts = {}) ⇒ Object
-
#slackbot ⇒ Object
Slack Client.
- #valid_uri?(uri) ⇒ Boolean
-
#validate_client_options! ⇒ Object
client methods.
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_list ⇒ Object (readonly)
Returns the value of attribute action_list.
#admin_users ⇒ Object (readonly)
Returns the value of attribute admin_users.
#allowed_launch_templates ⇒ Object (readonly)
Returns the value of attribute allowed_launch_templates.
#api_token ⇒ Object (readonly)
Returns the value of attribute api_token.
#api_url ⇒ Object (readonly)
Returns the value of attribute api_url.
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
#approval_channel ⇒ Object (readonly)
Returns the value of attribute approval_channel.
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
#console ⇒ Object (readonly)
Returns the value of attribute console.
#privileged_actions ⇒ Object (readonly)
Returns the value of attribute privileged_actions.
#signing_secret ⇒ Object (readonly)
Returns the value of attribute signing_secret.
#verification_token ⇒ Object (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
#request_headers(opts = {}) ⇒ Object
#slackbot ⇒ Object
Slack Client
#valid_uri?(uri) ⇒ Boolean
#validate_client_options! ⇒ Object
client methods