Class: TurbosmsRuby::Client
- Inherits:
-
Object
- Object
- TurbosmsRuby::Client
- Defined in:
- lib/turbosms_ruby/client.rb
Constant Summary collapse
- API_URL =
'https://api.turbosms.ua'
Instance Attribute Summary collapse
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#module_name ⇒ Object
Returns the value of attribute module_name.
Instance Method Summary collapse
Instance Attribute Details
#method_name ⇒ Object
Returns the value of attribute method_name.
6 7 8 |
# File 'lib/turbosms_ruby/client.rb', line 6 def method_name @method_name end |
#module_name ⇒ Object
Returns the value of attribute module_name.
6 7 8 |
# File 'lib/turbosms_ruby/client.rb', line 6 def module_name @module_name end |
Instance Method Details
#send_message(phones, text) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/turbosms_ruby/client.rb', line 8 def (phones,text) @module_name = 'message' @method_name = 'send.json' params = { recipients: phones, sms: { sender: ::TurbosmsRuby.config.sender, text: text } } response = post(params) JSON.parse(response.body) end |