Class: API::WhatCounts::OneOffMessageRequest
- Inherits:
-
Request
- Object
- Base::Request
- Request
- API::WhatCounts::OneOffMessageRequest
- Defined in:
- lib/whatcounts/api_request.rb
Instance Attribute Summary
Attributes inherited from Request
Attributes inherited from Base::Request
Instance Method Summary collapse
-
#initialize ⇒ OneOffMessageRequest
constructor
A new instance of OneOffMessageRequest.
- #set_data(message_data) ⇒ Object
Constructor Details
#initialize ⇒ OneOffMessageRequest
Returns a new instance of OneOffMessageRequest.
10 11 12 13 |
# File 'lib/whatcounts/api_request.rb', line 10 def initialize # corresponds to the WhatCounts HTTP API self.url = 'https://secure.whatcounts.com/bin/api_web' end |
Instance Method Details
#set_data(message_data) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/whatcounts/api_request.rb', line 15 def set_data() data_to_send = { :cmd => 'send', # the Send command in the API is used for one-off messages :pwd => .pwd, :list_id => .list_id, :realm => .realm, :format => .format, :to => .to, :template_id => .template_id, :data => .data } self.data = data_to_send end |