Class: Slack::Client
Overview
Use this class to make Slack API calls. You’ll need to obtain an OAuth 2 access token first; you can get one using either SlackOAuth2Flow.
Constant Summary
Constants included from Web::Users
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
Instance Method Summary collapse
-
#initialize(oauth2_access_token) ⇒ Client
constructor
Args: *
oauth2_access_token: Obtained via Slack::OAuth2::Flow or Slack::OAuth2::FlowNoRedirect.
Methods included from Web::Users
#users_get_presence, #users_info, #users_list, #users_set_active, #users_set_presence
Methods included from Web::Search
#search_all, #search_files, #search_messages
Methods included from Web::Stars
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_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
Constructor Details
#initialize(oauth2_access_token) ⇒ Client
Args:
-
oauth2_access_token: Obtained via Slack::OAuth2::Flow or Slack::OAuth2::FlowNoRedirect.
12 13 14 15 16 17 18 |
# File 'lib/slack/client.rb', line 12 def initialize(oauth2_access_token) if oauth2_access_token.is_a?(String) @session = OAuth2Session.new(oauth2_access_token) else raise ArgumentError.new("oauth2_access_token doesn't have a valid type") end end |