Class: Gupshup::REST::UserEvents
- Defined in:
- lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb
Instance Attribute Summary collapse
-
#apikey ⇒ Object
Returns the value of attribute apikey.
-
#app ⇒ Object
Returns the value of attribute app.
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from WhatsApp
Instance Method Summary collapse
-
#initialize(app, apikey, version = '2') ⇒ UserEvents
constructor
A new instance of UserEvents.
- #send ⇒ Object
Constructor Details
#initialize(app, apikey, version = '2') ⇒ UserEvents
Returns a new instance of UserEvents.
9 10 11 12 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 9 def initialize(app, apikey, version = '2') super @headers = { 'apikey' => @apikey } end |
Instance Attribute Details
#apikey ⇒ Object
Returns the value of attribute apikey.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def apikey @apikey end |
#app ⇒ Object
Returns the value of attribute app.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def app @app end |
#base_uri ⇒ Object
Returns the value of attribute base_uri.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def base_uri @base_uri end |
#content_type ⇒ Object
Returns the value of attribute content_type.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def content_type @content_type end |
#headers ⇒ Object
Returns the value of attribute headers.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def headers @headers end |
#version ⇒ Object
Returns the value of attribute version.
7 8 9 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 7 def version @version end |
Instance Method Details
#send ⇒ Object
14 15 16 17 18 19 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/user-event/user-event.rb', line 14 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 |