Module: Tacokit::Client::Labels

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

Instance Method Summary collapse

Instance Method Details

#create_label(board_id, name, color) ⇒ Tacokit::Resource

Create a label

Parameters:

  • board_id (String)

    the board identifier

  • name (String)

    the label name

  • color (String)

    the label color

Returns:

See Also:


28
29
30
31
32
33
# File 'lib/tacokit/client/labels.rb', line 28

def create_label(board_id, name, color)
  post "labels",
    board_id: board_id,
    name: name,
    color: color
end

#delete_label(label_id) ⇒ Object

Delete a label

Parameters:

  • label_id (String)

    the label identifier

See Also:


38
39
40
# File 'lib/tacokit/client/labels.rb', line 38

def delete_label(label_id)
  delete label_path(label_id)
end

#label(label_id, options = nil) ⇒ Tacokit::Resource

Retrieve a label

Parameters:

  • label_id (String)

    the label identifier

  • options (Hash) (defaults to: nil)

    options to fetch the label with

Returns:

See Also:


9
10
11
# File 'lib/tacokit/client/labels.rb', line 9

def label(label_id, options = nil)
  get label_path(label_id), options
end

#update_label(label_id, options = {}) ⇒ Tacokit::Resource

Update a label

Parameters:

  • label_id (String)

    the label identifier

  • options (Hash) (defaults to: {})

    the options to update the label with

Returns:

See Also:


18
19
20
# File 'lib/tacokit/client/labels.rb', line 18

def update_label(label_id, options = {})
  put label_path(label_id), options
end