Class: Shoutout
- Inherits:
-
Object
- Object
- Shoutout
- Defined in:
- lib/shoutout.rb
Defined Under Namespace
Classes: SMS
Instance Attribute Summary collapse
-
#apikey ⇒ Object
readonly
Init shoutout=Shoutout.new(“APIKEY HERE”).
Instance Method Summary collapse
-
#initialize(apikey) ⇒ Shoutout
constructor
A new instance of Shoutout.
- #sendSms(from:, to:, body:) ⇒ Object
Constructor Details
#initialize(apikey) ⇒ Shoutout
17 18 19 |
# File 'lib/shoutout.rb', line 17 def initialize(apikey) @apikey=apikey end |
Instance Attribute Details
#apikey ⇒ Object (readonly)
Init shoutout=Shoutout.new(“APIKEY HERE”)
Example:
>> response=shoutout.sendSms(from:"ShoutTEST",to:"94778811111",body:"This is a test message")
{"status"=>"1001", "description"=>"submit success", "cost"=>1, "responses"=>[{"destination"=>"94778811111", "reference_id"=>"ca31e340-c8f2-11eb-94b7-45623297139f", "status"=>"1001", "cost"=>1}]}
Arguments:
apikey: (String) ShoutOUT Apikey
from: (String) sender ID
to: (Array) receivers phone numbers
body: (String) message body
16 17 18 |
# File 'lib/shoutout.rb', line 16 def apikey @apikey end |