Sha256: c430dafc2d29beeaf953fb5221aeb2db459cd39b05eadf775b00619f9cbffdfb

Contents?: true

Size: 921 Bytes

Versions: 3

Compression:

Stored size: 921 Bytes

Contents

module Gupshup
  module REST
    class Api < Domain
      ##
      # Initialize the Api Domain
      def initialize(gupshup)
        super

        #@base_url = 'https://api.gupshup.com'
        #@host = 'api.gupshup.com'
        #@port = 443
        @uri = "https://api.gupshup.io/sm/api/v1/msg"

        # Versions
        @v1 = nil
      end

      ##
      # Version v1 of api
      def v1
        @v1 ||= V1.new self
      end
      
      ##
      # @param [String] sid The unique string that that we created to identify the
      #   Message resource.
      # @return [Gupshup::REST::Api::V1::AccountContext::MessageInstance] if sid was passed.
      # @return [Gupshup::REST::Api::V1::AccountContext::MessageList]
      def messages(sid=:unset)
        self.messages(sid)
      end

      ##
      # Provide a user friendly representation
      def to_s
        '#<Gupshup::REST::Api>'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gupshup-rb-0.2.1 lib/gupshup-rb/rest/api.rb
gupshup-rb-0.2.0 lib/gupshup-rb/rest/api.rb
gupshup-rb-0.1.9 lib/gupshup-rb/rest/api.rb