Module: Tacokit::Client::Lists
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/lists.rb
Instance Method Summary collapse
-
#archive_list_cards(list_id) ⇒ Object
Archive all cards in a list.
-
#create_list(board_id, name, options = {}) ⇒ Object
Create a new list.
-
#list(list_id, options = nil) ⇒ Object
Retrieve a list by id.
-
#list_actions(list_id, options = {}) ⇒ Object
Retrive a list’s actions.
-
#list_board(list_id, options = {}) ⇒ Object
Retrive a list’s board.
-
#list_cards(list_id, options = {}) ⇒ Object
Retrive a list’s cards.
-
#move_list_cards(list_id, destination_list_id, board_id) ⇒ Object
Move cards from one list to another.
-
#update_list(list_id, options = {}) ⇒ Object
Update a list’s attributes.
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, = {}) post list_path, .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, = nil) get list_path(list_id), 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, = {}) paginated_list_resource list_id, "actions", 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, = {}) list_resource list_id, "board", 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, = {}) paginated_list_resource list_id, "cards", 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, = {}) put list_path(list_id), end |