Class: Africastalking::Message
- Inherits:
-
Connection
- Object
- Connection
- Africastalking::Message
- Defined in:
- lib/africastalking/message.rb
Class Method Summary collapse
- .enqueue_message(data) ⇒ Object
- .fetch(last_received_id = 0) ⇒ Object
- .send(recipients, message) ⇒ Object
- .send_premium(data) ⇒ Object
Methods inherited from Connection
Class Method Details
.enqueue_message(data) ⇒ Object
17 18 19 |
# File 'lib/africastalking/message.rb', line 17 def (data) post('/version1/messaging', (data)) end |
.fetch(last_received_id = 0) ⇒ Object
5 6 7 |
# File 'lib/africastalking/message.rb', line 5 def fetch(last_received_id=0) get("/version1/messaging?username=#{Africastalking.config.username}&lastReceivedId=#{last_received_id}") end |
.send(recipients, message) ⇒ Object
9 10 11 |
# File 'lib/africastalking/message.rb', line 9 def send(recipients, ) post('/version1/messaging', (recipients, )) end |
.send_premium(data) ⇒ Object
13 14 15 |
# File 'lib/africastalking/message.rb', line 13 def send_premium(data) post('/version1/messaging', (data)) end |