Class: Mogreet::List
- Inherits:
-
Object
- Object
- Mogreet::List
- Defined in:
- lib/mogreet/list.rb
Instance Method Summary collapse
-
#append(options = {}) ⇒ Object
list_id numbers.
-
#create(options = {}) ⇒ Object
name.
-
#destroy(options) ⇒ Object
list_id name.
-
#download(options) ⇒ Object
list_id format.
-
#empty(options) ⇒ Object
list_id name.
- #info(options = {}) ⇒ Object
-
#initialize(client) ⇒ List
constructor
A new instance of List.
- #list(options = {}) ⇒ Object
-
#prune(options = {}) ⇒ Object
list_id numbers.
-
#send(options) ⇒ Object
list_id campaign_id subject message content_id content_url to_name from_name.
Constructor Details
#initialize(client) ⇒ List
Returns a new instance of List.
3 4 5 |
# File 'lib/mogreet/list.rb', line 3 def initialize(client) @client = client end |
Instance Method Details
#append(options = {}) ⇒ Object
list_id numbers
22 23 24 25 26 |
# File 'lib/mogreet/list.rb', line 22 def append( ={}) # TODO clone options? [:numbers] = [:numbers].join(',') if [:numbers].is_a?(Array) @client.get_request('/cm/list.append', ) end |
#create(options = {}) ⇒ Object
name
16 17 18 |
# File 'lib/mogreet/list.rb', line 16 def create( ={}) @client.get_request('/cm/list.create', ) end |
#destroy(options) ⇒ Object
list_id name
62 63 64 |
# File 'lib/mogreet/list.rb', line 62 def destroy() @client.get_request('/cm/list.destroy', ) end |
#download(options) ⇒ Object
list_id format
50 51 52 |
# File 'lib/mogreet/list.rb', line 50 def download() @client.get_request('/cm/list.download', ) end |
#empty(options) ⇒ Object
list_id name
56 57 58 |
# File 'lib/mogreet/list.rb', line 56 def empty() @client.get_request('/cm/list.empty', ) end |
#info(options = {}) ⇒ Object
11 12 13 |
# File 'lib/mogreet/list.rb', line 11 def info( ={}) @client.get_request('/cm/list.info', ) end |
#list(options = {}) ⇒ Object
7 8 9 |
# File 'lib/mogreet/list.rb', line 7 def list( ={}) @client.get_request('/cm/list.list', ) end |
#prune(options = {}) ⇒ Object
list_id numbers
30 31 32 33 34 |
# File 'lib/mogreet/list.rb', line 30 def prune( ={}) # TODO clone options? [:numbers] = [:numbers].join(',') if [:numbers].is_a?(Array) @client.get_request('/cm/list.prune', ) end |
#send(options) ⇒ Object
list_id campaign_id subject message content_id content_url to_name from_name
44 45 46 |
# File 'lib/mogreet/list.rb', line 44 def send() @client.get_request('/cm/list.send', ) end |