Class: Listmonk::Resources::Lists

Inherits:
Listmonk::Resource show all
Defined in:
lib/listmonk/resources/lists.rb

Instance Method Summary collapse

Methods inherited from Listmonk::Resource

#initialize

Constructor Details

This class inherits a constructor from Listmonk::Resource

Instance Method Details

#create(**attributes) ⇒ Object



7
# File 'lib/listmonk/resources/lists.rb', line 7

def create(**attributes) = post("lists", attributes)

#delete(id) ⇒ Object



10
# File 'lib/listmonk/resources/lists.rb', line 10

def delete(id) = delete_request("lists/#{segment(id)}")

#list(**params) ⇒ Object



6
# File 'lib/listmonk/resources/lists.rb', line 6

def list(**params) = get("lists", params)

#retrieve(id) ⇒ Object



8
# File 'lib/listmonk/resources/lists.rb', line 8

def retrieve(id) = get("lists/#{segment(id)}")

#update(id, **attributes) ⇒ Object



9
# File 'lib/listmonk/resources/lists.rb', line 9

def update(id, **attributes) = put("lists/#{segment(id)}", attributes)