Sha256: e0cdd3c5f674c59d95a7bbbc3acb0700e834c307c03b5ffdad0a1a52e1eb68f3

Contents?: true

Size: 1.12 KB

Versions: 34

Compression:

Stored size: 1.12 KB

Contents

require 'ably/rest/channel'
require 'ably/rest/channels'
require 'ably/rest/client'
require 'ably/rest/push'
require 'ably/rest/presence'

require 'ably/models/message_encoders/base'

Dir.glob(File.expand_path("models/*.rb", File.dirname(__FILE__))).each do |file|
  require file
end

module Ably
  # Rest provides the top-level class to be instanced for the Ably Rest library
  #
  # @example
  #   client = Ably::Rest.new("xxxxx")
  #   channel = client.channel("test")
  #   channel.publish "greeting", "data"
  #
  module Rest
    # Convenience method providing an alias to {Ably::Rest::Client} constructor.
    #
    # @param (see Ably::Rest::Client#initialize)
    # @option options (see Ably::Rest::Client#initialize)
    #
    # @return [Ably::Rest::Client]
    #
    # @example
    #    # create a new client authenticating with basic auth
    #    client = Ably::Rest.new('key.id:secret')
    #
    #    # create a new client authenticating with basic auth and a client_id
    #    client = Ably::Rest.new(key: 'key.id:secret', client_id: 'john')
    #
    def self.new(options)
      Ably::Rest::Client.new(options)
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
ably-rest-1.1.5 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.5 lib/ably/rest.rb
ably-rest-1.1.4 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.4 lib/ably/rest.rb
ably-rest-1.1.4.rc lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.4.rc lib/ably/rest.rb
ably-rest-1.1.3 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.3 lib/ably/rest.rb
ably-rest-1.1.2 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.2 lib/ably/rest.rb
ably-rest-1.1.2.rc1 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.1 lib/ably/rest.rb
ably-rest-1.1.0 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.1.0 lib/ably/rest.rb