Class: Trello::Label
Overview
A colored Label attached to a card
Instance Attribute Summary collapse
Attributes inherited from BasicData
Instance Method Summary collapse
-
#delete ⇒ Object
Delete this label.
Methods inherited from BasicData
#==, #attributes, client, #collection_name, #collection_path, create, #element_name, #element_path, find, #hash, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attrs, #save, save, schema, #schema, #update!, #update_fields
Methods included from JsonUtils
Constructor Details
This class inherits a constructor from Trello::BasicData
Instance Attribute Details
#board_id ⇒ String
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/trello/label.rb', line 13 class Label < BasicData schema do # Readonly attribute :id, readonly: true, primary_key: true # Writable attribute :name attribute :color # Writable but for create only attribute :board_id, create_only: true, remote_key: 'idBoard' end validates_presence_of :id, :board_id, :name validates_length_of :name, in: 1..16384 # Returns a reference to the board this label is currently connected. one :board, path: :boards, using: :board_id # Delete this label def delete client.delete("/labels/#{id}") end end |
#color ⇒ String
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/trello/label.rb', line 13 class Label < BasicData schema do # Readonly attribute :id, readonly: true, primary_key: true # Writable attribute :name attribute :color # Writable but for create only attribute :board_id, create_only: true, remote_key: 'idBoard' end validates_presence_of :id, :board_id, :name validates_length_of :name, in: 1..16384 # Returns a reference to the board this label is currently connected. one :board, path: :boards, using: :board_id # Delete this label def delete client.delete("/labels/#{id}") end end |
#id ⇒ String
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/trello/label.rb', line 13 class Label < BasicData schema do # Readonly attribute :id, readonly: true, primary_key: true # Writable attribute :name attribute :color # Writable but for create only attribute :board_id, create_only: true, remote_key: 'idBoard' end validates_presence_of :id, :board_id, :name validates_length_of :name, in: 1..16384 # Returns a reference to the board this label is currently connected. one :board, path: :boards, using: :board_id # Delete this label def delete client.delete("/labels/#{id}") end end |
#name ⇒ String
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/trello/label.rb', line 13 class Label < BasicData schema do # Readonly attribute :id, readonly: true, primary_key: true # Writable attribute :name attribute :color # Writable but for create only attribute :board_id, create_only: true, remote_key: 'idBoard' end validates_presence_of :id, :board_id, :name validates_length_of :name, in: 1..16384 # Returns a reference to the board this label is currently connected. one :board, path: :boards, using: :board_id # Delete this label def delete client.delete("/labels/#{id}") end end |
Instance Method Details
#delete ⇒ Object
Delete this label
34 35 36 |
# File 'lib/trello/label.rb', line 34 def delete client.delete("/labels/#{id}") end |