Sha256: 5e599464b991065e62a199ce4d7d7c8ba7d05fecc617a3906c028e80149aa9b4

Contents?: true

Size: 1001 Bytes

Versions: 1

Compression:

Stored size: 1001 Bytes

Contents

require "chatwork/version"

module ChatWork
  autoload(:Client, 'chatwork/client')
  autoload(:Operations, 'chatwork/operations')
  autoload(:ChatWorkError, 'chatwork/chatwork_error')
  autoload(:APIConnectionError, 'chatwork/chatwork_error')
  autoload(:APIError, 'chatwork/chatwork_error')
  autoload(:Room, 'chatwork/room')
  autoload(:Entity, 'chatwork/entity')
  autoload(:Message, 'chatwork/message')
  autoload(:Me, 'chatwork/me')
  autoload(:MyTask, 'chatwork/my_task')
  autoload(:Task, 'chatwork/task')
  autoload(:Member, 'chatwork/member')

  @api_base = 'https://api.chatwork.com/'
  @api_version = '/v1'
  @api_key = nil

  class << self
    def client
      @client ||= Client.new(@api_key, @api_base, @api_version)
    end

    def api_base=(new_value)
      @api_base = new_value
      @client = nil
    end

    def api_key=(new_value)
      @api_key = new_value
      @client = nil
    end

    def api_base
      @api_base
    end

    def api_key
      @api_key
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chatwork-0.1.2 lib/chatwork.rb