Sha256: fb3afac9cc75095aa37fcfecbfd6b37ce04cfffa845756d2d55fa7c8d3592d8e

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 KB

Contents

require 'ably/rest/channel'
require 'ably/rest/channels'
require 'ably/rest/client'
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

12 entries across 12 versions & 2 rubygems

Version Path
ably-1.0.7 lib/ably/rest.rb
ably-rest-1.0.6 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.0.6 lib/ably/rest.rb
ably-rest-1.0.5 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.0.5 lib/ably/rest.rb
ably-1.0.4 lib/ably/rest.rb
ably-1.0.3 lib/ably/rest.rb
ably-1.0.2 lib/ably/rest.rb
ably-1.0.1 lib/ably/rest.rb
ably-rest-1.0.0 lib/submodules/ably-ruby/lib/ably/rest.rb
ably-1.0.0 lib/ably/rest.rb
ably-rest-0.9.3 lib/submodules/ably-ruby/lib/ably/rest.rb