Class: Slack::API

Inherits:
Object
  • Object
show all
Includes:
Connection, Endpoint, Request
Defined in:
lib/slack/api.rb

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods included from Endpoint::Users

#users_getPresence, #users_info, #users_list, #users_setActive, #users_setPresence

Methods included from Endpoint::Stars

#stars_list

Methods included from Endpoint::Search

#search_all, #search_files, #search_messages

Methods included from Endpoint::Presence

#presence_set

Methods included from Endpoint::Oauth

#oauth_access

Methods included from Endpoint::Im

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

Methods included from Endpoint::Groups

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

Methods included from Endpoint::Files

#files_info, #files_list, #files_upload

Methods included from Endpoint::Emoji

#emoji_list

Methods included from Endpoint::Chat

#chat_delete, #chat_postMessage, #chat_update

Methods included from Endpoint::Channels

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

Methods included from Endpoint::Auth

#auth_test

Methods included from Endpoint::Api

#api_test

Methods included from Request

#delete, #get, #post, #put

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API



14
15
16
17
18
19
# File 'lib/slack/api.rb', line 14

def initialize(options={})
  options = Slack.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#realtimeObject



25
26
27
28
# File 'lib/slack/api.rb', line 25

def realtime
  url = post("rtm.start")["url"]
  RealTime::Client.new(url)
end