Class: Slack::Client
Overview
Use this class to make Slack API calls. You'll need to obtain an OAuth 2 access token
Constant Summary
Constants included from Web::Users
Constants included from Web::Team
Constants included from Web::Search
Constants included from Web::Stars
Constants included from Web::Im
Constants included from Web::Groups
Constants included from Web::Files
Constants included from Web::Emoji
Constants included from Web::Chat
Constants included from Web::Channels
Constants included from Web::Auth
Constants included from Web::Api
Instance Method Summary collapse
-
#initialize(oauth2_access_token) ⇒ Client
constructor
A new instance of Client.
Methods included from Web::Users
#users_get_presence, #users_info, #users_list, #users_set_active, #users_set_presence
Methods included from Web::Team
Methods included from Web::Search
#search_all, #search_files, #search_messages
Methods included from Web::Stars
#stars_add, #stars_list, #stars_remove
Methods included from Web::Im
#im_close, #im_history, #im_list, #im_mark, #im_open
Methods included from Web::Groups
#groups_archive, #groups_close, #groups_create, #groups_create_child, #groups_history, #groups_info, #groups_invite, #groups_kick, #groups_leave, #groups_list, #groups_mark, #groups_open, #groups_rename, #groups_set_purpose, #groups_set_topic, #groups_unarchive
Methods included from Web::Files
#files_delete, #files_info, #files_list, #files_upload
Methods included from Web::Emoji
Methods included from Web::Chat
#chat_delete, #chat_post_message, #chat_update
Methods included from Web::Channels
#channels_archive, #channels_create, #channels_history, #channels_info, #channels_invite, #channels_join, #channels_kick, #channels_leave, #channels_list, #channels_mark, #channels_rename, #channels_set_purpose, #channels_set_topic, #channels_unarchive
Methods included from Web::Auth
Methods included from Web::Api
Constructor Details
#initialize(oauth2_access_token) ⇒ Client
Returns a new instance of Client.
14 15 16 17 18 19 |
# File 'lib/slack/client.rb', line 14 def initialize(oauth2_access_token) unless oauth2_access_token.is_a?(String) fail ArgumentError, 'bad type for oauth2_access_token (expecting String)' end @session = Session.new(oauth2_access_token) end |