Module: IContact::Api::Lists
- Included in:
- IContact::Api
- Defined in:
- lib/icontact/api/lists.rb
Instance Method Summary collapse
- #create_list(data) ⇒ Object
- #create_lists(data) ⇒ Object
- #delete_list(id) ⇒ Object
- #get_list(id) ⇒ Object
- #get_lists(limit = 10000) ⇒ Object
- #update_list(id, data) ⇒ Object
- #update_list!(id, data) ⇒ Object
- #update_lists(data) ⇒ Object
Instance Method Details
#create_list(data) ⇒ Object
15 16 17 18 |
# File 'lib/icontact/api/lists.rb', line 15 def create_list(data) response = post(lists_path, wrap(data)) resource(response, 'lists', 0) end |
#create_lists(data) ⇒ Object
20 21 22 23 |
# File 'lib/icontact/api/lists.rb', line 20 def create_lists(data) response = post(lists_path, data) resource(response, 'lists') end |
#delete_list(id) ⇒ Object
40 41 42 43 |
# File 'lib/icontact/api/lists.rb', line 40 def delete_list(id) response = delete(lists_path + id) resource(response, 'status') end |
#get_list(id) ⇒ Object
5 6 7 8 |
# File 'lib/icontact/api/lists.rb', line 5 def get_list(id) response = get(lists_path + id) resource(response, 'list') end |
#get_lists(limit = 10000) ⇒ Object
10 11 12 13 |
# File 'lib/icontact/api/lists.rb', line 10 def get_lists(limit = 10000) response = get(lists_path + query(limit: limit)) resource(response, 'lists') end |
#update_list(id, data) ⇒ Object
25 26 27 28 |
# File 'lib/icontact/api/lists.rb', line 25 def update_list(id, data) response = post(lists_path + id, data) resource(response, 'list') end |
#update_list!(id, data) ⇒ Object
30 31 32 33 |
# File 'lib/icontact/api/lists.rb', line 30 def update_list!(id, data) response = put(lists_path + id, data) resource(response, 'list') end |
#update_lists(data) ⇒ Object
35 36 37 38 |
# File 'lib/icontact/api/lists.rb', line 35 def update_lists(data) response = post(lists_path, data) resource(response, 'lists') end |