Sha256: 2c7a0215c350ebf5bf489738b78046533a164c917cb6e6031a78cd629477bc8d

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

require_relative '../whatsapp'

module Gupshup
  module REST
    class UserEvents < Gupshup::REST::WhatsApp
      attr_accessor :app, :base_uri, :apikey, :version, :content_type, :headers

      def initialize(app, apikey, version = '2')
        super
        @headers = { 'apikey' => @apikey }
      end

      def send
        r = Gupshup::HTTP::Client.new
        r = r.request(host = base_uri, port = 443, method = 'GET', url = "/sm/api/v1/users/#{app}", headers = @headers)
        puts r.inspect
        r
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gupshup_whatsapp-1.0.7 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.6 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.5 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.4 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.3 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.2 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.1 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
gupshup_whatsapp-1.0.0 lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb