Sha256: 2d7347584852304757c827c973b043e224eea2243a842834b06238757b082f37

Contents?: true

Size: 729 Bytes

Versions: 3

Compression:

Stored size: 729 Bytes

Contents

require File.expand_path('../connection', __FILE__)
require File.expand_path('../request', __FILE__)
require File.expand_path('../configuration', __FILE__)
require File.expand_path('../endpoint', __FILE__)
require File.expand_path('../realtime/client', __FILE__)

module Slack
  # @private
  class API
    # @private
    attr_accessor(*Configuration::VALID_OPTIONS_KEYS)

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

    include Connection
    include Request
    include Endpoint

    def realtime
      RealTime::Client.new(post("rtm.start"))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-api-1.6.1 lib/slack/api.rb
slack-api-1.6.0 lib/slack/api.rb
slack-api-1.5.0 lib/slack/api.rb