Module: Tacokit::Client::Lists

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

Instance Method Summary collapse

Instance Method Details

#archive_list_cards(list_id) ⇒ Object

Archive all cards in a list


49
50
51
# File 'lib/tacokit/client/lists.rb', line 49

def archive_list_cards(list_id)
  post list_path(list_id, camp("archive_all_cards"))
end

#create_list(board_id, name, options = {}) ⇒ Object

Create a new list


42
43
44
# File 'lib/tacokit/client/lists.rb', line 42

def create_list(board_id, name, options = {})
  post list_path, options.merge(name: name, board_id: board_id)
end

#list(list_id, options = nil) ⇒ Object

Retrieve a list by id


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

def list(list_id, options = nil)
  get list_path(list_id), options
end

#list_actions(list_id, options = {}) ⇒ Object

Retrive a list's actions


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

def list_actions(list_id, options = {})
  paginated_list_resource list_id, "actions", options
end

#list_board(list_id, options = {}) ⇒ Object

Retrive a list's board


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

def list_board(list_id, options = {})
  list_resource list_id, "board", options
end

#list_cards(list_id, options = {}) ⇒ Object

Retrive a list's cards


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

def list_cards(list_id, options = {})
  paginated_list_resource list_id, "cards", options
end

#move_list_cards(list_id, destination_list_id, board_id) ⇒ Object

Move cards from one list to another


56
57
58
59
# File 'lib/tacokit/client/lists.rb', line 56

def move_list_cards(list_id, destination_list_id, board_id)
  post list_path(list_id, camp("move_all_cards")),
    list_id: destination_list_id, board_id: board_id
end

#update_list(list_id, options = {}) ⇒ Object

Update a list's attributes


35
36
37
# File 'lib/tacokit/client/lists.rb', line 35

def update_list(list_id, options = {})
  put list_path(list_id), options
end