Module: Tacokit::Client::Checklists

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/checklists.rb

Instance Method Summary collapse

Instance Method Details

#add_checklist_check_item(checklist_id, name, options = {}) ⇒ Object Also known as: checklist_check_item_create, add_checklist_item

Add a checklist item to a checklist


53
54
55
# File 'lib/tacokit/client/checklists.rb', line 53

def add_checklist_check_item(checklist_id, name, options = {})
  post checklist_path(checklist_id, "checkItems"), options.merge(name: name)
end

#check_items(checklist_id, options = {}) ⇒ Object Also known as: checklist_check_items

Retrieve a checklist's check items


28
29
30
# File 'lib/tacokit/client/checklists.rb', line 28

def check_items(checklist_id, options = {})
  checklist_resource checklist_id, "check_items", options
end

#checklist(checklist_id, options = nil) ⇒ Object

Retrieve a checklist


7
8
9
# File 'lib/tacokit/client/checklists.rb', line 7

def checklist(checklist_id, options = nil)
  get checklist_path(checklist_id), options
end

#checklist_board(checklist_id, options = {}) ⇒ Object

Retrieve the checklist's board


14
15
16
# File 'lib/tacokit/client/checklists.rb', line 14

def checklist_board(checklist_id, options = {})
  checklist_resource "board", options
end

#checklist_card(checklist_id, options = {}) ⇒ Object

Retrieve a checklist's card


21
22
23
# File 'lib/tacokit/client/checklists.rb', line 21

def checklist_card(checklist_id, options = {})
  checklist_resource "card", options
end

#create_checklist(card_id, name, options = {}) ⇒ Object Also known as: checklist_create

Create a checklist


44
45
46
47
# File 'lib/tacokit/client/checklists.rb', line 44

def create_checklist(card_id, name, options = {})
  options.update card_id: card_id, name: name
  post checklist_path, options
end

#delete_checklist(checklist_id) ⇒ Object Also known as: checklist_delete

Delete a checklist


62
63
64
# File 'lib/tacokit/client/checklists.rb', line 62

def delete_checklist(checklist_id)
  delete checklist_path(checklist_id)
end

#update_checklist(checklist_id, options = {}) ⇒ Object Also known as: checklist_update

Updates a checklist


36
37
38
# File 'lib/tacokit/client/checklists.rb', line 36

def update_checklist(checklist_id, options = {})
  put checklist_path(checklist_id), options
end