Module: Tacokit::Client::Lists
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/lists.rb
Overview
Methods for the Lists API
Instance Method Summary collapse
-
#archive_list_cards(list_id) ⇒ Object
Archive all cards in a list.
-
#create_list(board_id, name, options = {}) ⇒ Tacokit::Resource<List>
Create a new list.
-
#list(list_id, options = nil) ⇒ Tacokit::Resource<List>
Retrieve a list by id.
-
#list_actions(list_id, options = {}) ⇒ Tacokit::Collection<Action>
Retrieve list’s actions.
-
#list_board(list_id, options = {}) ⇒ Tacokit::Resource<Board>
Retrieve a list’s board.
-
#list_cards(list_id, options = {}) ⇒ Tacokit::Collection<Card>
Retrive a list’s cards.
-
#move_list_cards(list_id, destination_list_id, board_id = nil) ⇒ Object
Move cards from one list to another.
-
#update_list(list_id, options = {}) ⇒ Tacokit::Resource<List>
Update a list’s attributes.
Instance Method Details
#archive_list_cards(list_id) ⇒ Object
Archive all cards in a list
88 89 90 |
# File 'lib/tacokit/client/lists.rb', line 88 def archive_list_cards(list_id) post list_path(list_id, camp("archive_all_cards")) end |
#create_list(board_id, name, options = {}) ⇒ Tacokit::Resource<List>
Create a new list
78 79 80 |
# File 'lib/tacokit/client/lists.rb', line 78 def create_list(board_id, name, = {}) post "lists", .merge(name: name, board_id: resource_id(board_id)) end |
#list(list_id, options = nil) ⇒ Tacokit::Resource<List>
Retrieve a list by id
12 13 14 |
# File 'lib/tacokit/client/lists.rb', line 12 def list(list_id, = nil) get list_path(list_id), end |
#list_actions(list_id, options = {}) ⇒ Tacokit::Collection<Action>
Retrieve list’s actions
24 25 26 |
# File 'lib/tacokit/client/lists.rb', line 24 def list_actions(list_id, = {}) paginated_list_resource list_id, "actions", end |
#list_board(list_id, options = {}) ⇒ Tacokit::Resource<Board>
Retrieve a list’s board
36 37 38 |
# File 'lib/tacokit/client/lists.rb', line 36 def list_board(list_id, = {}) list_resource list_id, "board", end |
#list_cards(list_id, options = {}) ⇒ Tacokit::Collection<Card>
Retrive a list’s cards
53 54 55 |
# File 'lib/tacokit/client/lists.rb', line 53 def list_cards(list_id, = {}) paginated_list_resource list_id, "cards", end |
#move_list_cards(list_id, destination_list_id, board_id = nil) ⇒ Object
Move cards from one list to another
101 102 103 104 105 |
# File 'lib/tacokit/client/lists.rb', line 101 def move_list_cards(list_id, destination_list_id, board_id = nil) board_id ||= resolve_board_id(destination_list_id) post list_path(list_id, camp("move_all_cards")), list_id: resource_id(destination_list_id), board_id: resource_id(board_id) end |
#update_list(list_id, options = {}) ⇒ Tacokit::Resource<List>
Update a list’s attributes
65 66 67 |
# File 'lib/tacokit/client/lists.rb', line 65 def update_list(list_id, = {}) put list_path(list_id), end |