class Honeybadger::Api::Team
Attributes
created_at[R]
id[R]
name[R]
owner[R]
projects[R]
team_members[R]
Public Class Methods
all()
click to toggle source
Public: Find all of the teams.
# File lib/honeybadger-api/team.rb, line 22 def self.all Honeybadger::Api::Request.all("teams", handler) end
find(team_id)
click to toggle source
Public: Find a team.
# File lib/honeybadger-api/team.rb, line 32 def self.find(team_id) Honeybadger::Api::Request.find("teams/#{team_id}", handler) end
handler()
click to toggle source
Internal: The handler used to build objects from API responses.
# File lib/honeybadger-api/team.rb, line 37 def self.handler Proc.new { |response| Team.new(response) } end
new(opts)
click to toggle source
Public: Build a new instance of Team
opts - A Hash of attributes to initialize a Team
Returns a new Team
# File lib/honeybadger-api/team.rb, line 12 def initialize(opts) @id = opts[:id] @name = opts[:name] @owner = User.new(opts[:owner][:name], opts[:owner][:email]) @team_members = opts[:members].collect { |m| TeamMember.new(m) } @projects = opts[:projects].collect { |p| Project.new(p) } @created_at = opts[:created_at].nil? ? nil : DateTime.parse(opts[:created_at]) end
paginate(filters = {})
click to toggle source
Public: Paginate all of the teams.
# File lib/honeybadger-api/team.rb, line 27 def self.paginate(filters = {}) Honeybadger::Api::Request.paginate("teams", handler, filters) end