Module: Tacokit::Client::Boards
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/boards.rb
Instance Method Summary collapse
-
#add_board_member(board_id, email, full_name, options = {}) ⇒ Object
Add a member to a board.
-
#board(board_id, options = nil) ⇒ Object
Retrieve a board.
-
#board_actions(board_id, options = {}) ⇒ Object
Retrieve a board’s actions.
-
#board_cards(board_id, options = {}) ⇒ Object
Retrieve a board’s cards.
-
#board_checklists(board_id, options = {}) ⇒ Object
Retrieve a board’s checklists.
-
#board_labels(board_id, options = {}) ⇒ Object
Retrieve a board’s labels.
-
#board_members(board_id, options = {}) ⇒ Object
Retrieve a board’s members.
-
#board_organization(board_id, options = {}) ⇒ Object
Retrieve a board’s organization.
-
#board_preferences(board_id, options = {}) ⇒ Object
Retrieve your preferences for a board.
-
#board_stars(board_id, options = {}) ⇒ Object
Retrieve a board’s stars.
-
#create_board(name, options = {}) ⇒ Object
POST /1/boards.
-
#lists(board_id, options = {}) ⇒ Object
(also: #board_lists)
Retrieve a board’s lists.
-
#update_board(board_id, options = {}) ⇒ Object
Update board attributes.
-
#update_board_member(board_id, member_id, type) ⇒ Object
Update a board member’s type.
Instance Method Details
#add_board_member(board_id, email, full_name, options = {}) ⇒ Object
Add a member to a board
85 86 87 88 89 90 |
# File 'lib/tacokit/client/boards.rb', line 85 def add_board_member(board_id, email, full_name, = {}) .update \ email: email, full_name: full_name put board_path(board_id, "members"), end |
#board(board_id, options = nil) ⇒ Object
Retrieve a board
7 8 9 |
# File 'lib/tacokit/client/boards.rb', line 7 def board(board_id, = nil) get board_path(board_id), end |
#board_actions(board_id, options = {}) ⇒ Object
Retrieve a board’s actions
14 15 16 |
# File 'lib/tacokit/client/boards.rb', line 14 def board_actions(board_id, = {}) paginated_board_resource(board_id, "actions", ) end |
#board_cards(board_id, options = {}) ⇒ Object
Retrieve a board’s cards
28 29 30 |
# File 'lib/tacokit/client/boards.rb', line 28 def board_cards(board_id, = {}) paginated_board_resource(board_id, "cards", ) end |
#board_checklists(board_id, options = {}) ⇒ Object
Retrieve a board’s checklists
35 36 37 |
# File 'lib/tacokit/client/boards.rb', line 35 def board_checklists(board_id, = {}) board_resource(board_id, "checklists", ) end |
#board_labels(board_id, options = {}) ⇒ Object
Retrieve a board’s labels
42 43 44 |
# File 'lib/tacokit/client/boards.rb', line 42 def board_labels(board_id, = {}) board_resource(board_id, "labels", ) end |
#board_members(board_id, options = {}) ⇒ Object
Retrieve a board’s members
57 58 59 |
# File 'lib/tacokit/client/boards.rb', line 57 def board_members(board_id, = {}) board_resource(board_id, "members", ) end |
#board_organization(board_id, options = {}) ⇒ Object
Retrieve a board’s organization
71 72 73 |
# File 'lib/tacokit/client/boards.rb', line 71 def board_organization(board_id, = {}) board_resource(board_id, "organization", ) end |
#board_preferences(board_id, options = {}) ⇒ Object
Retrieve your preferences for a board
64 65 66 |
# File 'lib/tacokit/client/boards.rb', line 64 def board_preferences(board_id, = {}) board_resource(board_id, "my_prefs", ) end |
#board_stars(board_id, options = {}) ⇒ Object
Retrieve a board’s stars
21 22 23 |
# File 'lib/tacokit/client/boards.rb', line 21 def board_stars(board_id, = {}) board_resource(board_id, "board_stars", ) end |
#create_board(name, options = {}) ⇒ Object
POST /1/boards
100 101 102 |
# File 'lib/tacokit/client/boards.rb', line 100 def create_board(name, = {}) post board_path, .merge(name: name) end |
#lists(board_id, options = {}) ⇒ Object Also known as: board_lists
Retrieve a board’s lists
49 50 51 |
# File 'lib/tacokit/client/boards.rb', line 49 def lists(board_id, = {}) board_resource(board_id, "lists", ) end |
#update_board(board_id, options = {}) ⇒ Object
Update board attributes
78 79 80 |
# File 'lib/tacokit/client/boards.rb', line 78 def update_board(board_id, = {}) put board_path(board_id), end |
#update_board_member(board_id, member_id, type) ⇒ Object
Update a board member’s type
95 96 97 |
# File 'lib/tacokit/client/boards.rb', line 95 def update_board_member(board_id, member_id, type) update_board_resource(board_id, "members", member_id, type: type) end |