class Trello::Board
A board on Trello
@!attribute [r] id
@return [String]
@!attribute [r] starred
@return [Boolean]
@!attribute [r] pinned
@return [Boolean]
@!attribute [r] url
@return [String]
@!attribute [r] short_url
@return [String]
@!attribute [r] prefs
@return [Hash]
@!attribute [r] last_activity_date
@return [Datetime]
@!attribute [r] description_data
@return [Datetime]
@!attribute [r] enterprise_id
@return [String]
@!attribute [rw] name
@return [String]
@!attribute [rw] description
@return [String]
@!attribute [rw] organization_id
@return [String]
@!attribute [rw] visibility_level
@return [String]
@!attribute [rw] voting_permission_level
@return [String]
@!attribute [rw] comment_permission_level
@return [String]
@!attribute [rw] invitation_permission_level
@return [String]
@!attribute [rw] enable_self_join
@return [Boolean]
@!attribute [rw] enable_card_covers
@return [Boolean]
@!attribute [rw] background_color
@return [String]
@!attribute [rw] background_image
@return [String]
@!attribute [rw] card_aging_type
@return [String]
@!attribute [w] use_default_labels
@return [Boolean]
@!attribute [w] use_default_lists
@return [Boolean]
@!attribute [w] source_board_id
@return [String]
@!attribute [w] keep_cards_from_source
@return [String]
@!attribute [w] power_ups
@return [String]
@!attribute [rw] closed
@return [Boolean]
@!attribute [w] subscribed
@return [Boolean]
Public Class Methods
@return [Array<Trello::Board>] all boards for the current user
# File lib/trello/board.rb, line 109 def all from_response client.get("/members/#{Member.find(:me).username}/boards") end
Public Instance Methods
Add a member to this Board
.
type => [ :admin, :normal, :observer ]
# File lib/trello/board.rb, line 137 def add_member(member, type = :normal) client.put("/boards/#{self.id}/members/#{member.id}", { type: type }) end
@return [Boolean]
# File lib/trello/board.rb, line 115 def closed? attributes[:closed] end
Find a card on this Board
with the given ID. @return [Trello::Card]
# File lib/trello/board.rb, line 131 def find_card(card_id) Card.from_response client.get("/boards/#{self.id}/cards/#{card_id}") end
@return [Boolean]
# File lib/trello/board.rb, line 125 def has_lists? lists.size > 0 end
# File lib/trello/board.rb, line 190 def label_names label_names = LabelName.from_response client.get("/boards/#{id}/labelnames") MultiAssociation.new(self, label_names).proxy end
# File lib/trello/board.rb, line 183 def labels(params = {}) # Set the limit to as high as possible given there is no pagination in this API. params[:limit] = 1000 unless params[:limit] labels = Label.from_response client.get("/boards/#{id}/labels", params) MultiAssociation.new(self, labels).proxy end
Remove a member of this Board
.
# File lib/trello/board.rb, line 142 def remove_member(member) client.delete("/boards/#{self.id}/members/#{member.id}") end
@return [Boolean]
# File lib/trello/board.rb, line 120 def starred? attributes[:starred] end