Class: Gupshup::REST::WhatsApp
- Inherits:
-
Object
- Object
- Gupshup::REST::WhatsApp
- Defined in:
- lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#apikey ⇒ Object
readonly
Returns the value of attribute apikey.
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#base_uri ⇒ Object
readonly
Returns the value of attribute base_uri.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(app, apikey, version = '1', phone = "917384811114") ⇒ WhatsApp
constructor
A new instance of WhatsApp.
Constructor Details
#initialize(app, apikey, version = '1', phone = "917384811114") ⇒ WhatsApp
Returns a new instance of WhatsApp.
7 8 9 10 11 12 13 14 15 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 7 def initialize(app, apikey, version = '1', phone="917384811114") @app = app @apikey = apikey @version = version @content_type = 'application/x-www-form-urlencoded' @base_uri = 'https://api.gupshup.io' @path = '/sm/api/v1/msg' @phone = phone end |
Instance Attribute Details
#apikey ⇒ Object (readonly)
Returns the value of attribute apikey.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def apikey @apikey end |
#app ⇒ Object (readonly)
Returns the value of attribute app.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def app @app end |
#base_uri ⇒ Object (readonly)
Returns the value of attribute base_uri.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def base_uri @base_uri end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def content_type @content_type end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def path @path end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
5 6 7 |
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5 def phone @phone end |