Class: Slack::Web::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Endpoints, Faraday::Connection, Faraday::Request
Defined in:
lib/slack/web/client.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Api::Endpoints::UsersProfile

#users_profile_get, #users_profile_set

Methods included from Api::Endpoints::Users

#users_deletePhoto, #users_getPresence, #users_identity, #users_info, #users_list, #users_setActive, #users_setPhoto, #users_setPresence

Methods included from Api::Endpoints::UsergroupsUsers

#usergroups_users_list, #usergroups_users_update

Methods included from Api::Endpoints::Usergroups

#usergroups_create, #usergroups_disable, #usergroups_enable, #usergroups_list, #usergroups_update

Methods included from Api::Endpoints::TeamProfile

#team_profile_get

Methods included from Api::Endpoints::Team

#team_accessLogs, #team_billableInfo, #team_info, #team_integrationLogs

Methods included from Api::Endpoints::Stars

#stars_add, #stars_list, #stars_remove

Methods included from Api::Endpoints::Search

#search_all, #search_files, #search_messages

Methods included from Api::Endpoints::Rtm

#rtm_connect, #rtm_start

Methods included from Api::Endpoints::Reminders

#reminders_add, #reminders_complete, #reminders_delete, #reminders_info, #reminders_list

Methods included from Api::Endpoints::Reactions

#reactions_add, #reactions_get, #reactions_list, #reactions_remove

Methods included from Api::Endpoints::Pins

#pins_add, #pins_list, #pins_remove

Methods included from Api::Endpoints::Oauth

#oauth_access

Methods included from Api::Endpoints::Mpim

#mpim_close, #mpim_history, #mpim_list, #mpim_mark, #mpim_open, #mpim_replies

Methods included from Api::Endpoints::Im

#im_close, #im_history, #im_list, #im_mark, #im_open, #im_replies

Methods included from Api::Endpoints::Groups

#groups_archive, #groups_close, #groups_create, #groups_createChild, #groups_history, #groups_info, #groups_invite, #groups_kick, #groups_leave, #groups_list, #groups_mark, #groups_open, #groups_rename, #groups_replies, #groups_setPurpose, #groups_setTopic, #groups_unarchive

Methods included from Api::Endpoints::Files

#files_delete, #files_info, #files_list, #files_revokePublicURL, #files_sharedPublicURL, #files_upload

Methods included from Api::Endpoints::FilesComments

#files_comments_add, #files_comments_delete, #files_comments_edit

Methods included from Api::Endpoints::Emoji

#emoji_list

Methods included from Api::Endpoints::Dnd

#dnd_endDnd, #dnd_endSnooze, #dnd_info, #dnd_setSnooze, #dnd_teamInfo

Methods included from Api::Endpoints::Chat

#chat_delete, #chat_meMessage, #chat_postMessage, #chat_unfurl, #chat_update

Methods included from Api::Endpoints::Channels

#channels_archive, #channels_create, #channels_history, #channels_info, #channels_invite, #channels_join, #channels_kick, #channels_leave, #channels_list, #channels_mark, #channels_rename, #channels_replies, #channels_setPurpose, #channels_setTopic, #channels_unarchive

Methods included from Api::Endpoints::Bots

#bots_info

Methods included from Api::Endpoints::Auth

#auth_revoke, #auth_test

Methods included from Api::Mixins::Groups

#groups_id

Methods included from Api::Mixins::Users

#users_id, #users_search

Methods included from Api::Mixins::Channels

#channels_id

Methods included from Faraday::Request

#delete, #get, #post, #put

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
16
# File 'lib/slack/web/client.rb', line 10

def initialize(options = {})
  Slack::Web::Config::ATTRIBUTES.each do |key|
    send("#{key}=", options[key] || Slack::Web.config.send(key))
  end
  @logger ||= Slack::Config.logger || Slack::Logger.default
  @token ||= Slack.config.token
end

Class Method Details

.configObject



23
24
25
# File 'lib/slack/web/client.rb', line 23

def config
  Config
end

.configureObject



19
20
21
# File 'lib/slack/web/client.rb', line 19

def configure
  block_given? ? yield(Config) : Config
end