Module: Tacokit::Client::Boards

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

Instance Method Summary collapse

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, options = {})
  options.update \
    email: email,
    full_name: full_name
  put board_path(board_id, "members"), options
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, options = nil)
  get board_path(board_id), options
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, options = {})
  paginated_board_resource(board_id, "actions", options)
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, options = {})
  paginated_board_resource(board_id, "cards", options)
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, options = {})
  board_resource(board_id, "checklists", options)
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, options = {})
  board_resource(board_id, "labels", options)
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, options = {})
  board_resource(board_id, "members", options)
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, options = {})
  board_resource(board_id, "organization", options)
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, options = {})
  board_resource(board_id, "my_prefs", options)
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, options = {})
  board_resource(board_id, "board_stars", options)
end

#create_board(name, options = {}) ⇒ Object

POST /1/boards



100
101
102
# File 'lib/tacokit/client/boards.rb', line 100

def create_board(name, options = {})
  post board_path, options.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, options = {})
  board_resource(board_id, "lists", options)
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, options = {})
  put board_path(board_id), options
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