class Trello::Organization
Organizations are useful for linking members together.
@!attribute [r] id
@return [String]
@!attribute [r] name
@return [String]
@!attribute [r] display_name
@return [String]
@!attribute [r] description
@return [String]
@!attribute [r] url
@return [String]
Public Class Methods
find(id, params = {})
click to toggle source
Find an organization by its id.
# File lib/trello/organization.rb, line 27 def find(id, params = {}) client.find(:organization, id, params) end
Public Instance Methods
boards()
click to toggle source
Returns a list of boards under this organization.
# File lib/trello/organization.rb, line 52 def boards boards = Board.from_response client.get("/organizations/#{id}/boards/all") MultiAssociation.new(self, boards).proxy end
members(params = {})
click to toggle source
Returns an array of members associated with the organization.
# File lib/trello/organization.rb, line 58 def members(params = {}) members = Member.from_response client.get("/organizations/#{id}/members/all", params) MultiAssociation.new(self, members).proxy end
update_fields(fields)
click to toggle source
Update the fields of an organization.
Supply a hash of string keyed data retrieved from the Trello
API representing an Organization
.
# File lib/trello/organization.rb, line 36 def update_fields(fields) attributes[:id] = fields['id'] attributes[:name] = fields['name'] attributes[:display_name] = fields['displayName'] attributes[:description] = fields['desc'] attributes[:url] = fields['url'] attributes[:invited] = fields['invited'] attributes[:website] = fields['website'] attributes[:logo_hash] = fields['logoHash'] attributes[:billable_member_count] = fields['billableMemberCount'] attributes[:active_billable_member_count] = fields['activeBillableMemberCount'] attributes[:memberships] = fields['memberships'] self end