class Tinybucket::Model::Team

Team

@see developer.atlassian.com/bitbucket/api/2/reference/resource/teams

teams Endpoint

@!attribute [rw] username

@return [String]

@!attribute [rw] kind

@return [String, NillClass]

@!attribute [rw] website

@return [String, NillClass]

@!attribute [rw] display_name

@return [String]

@!attribute [rw] uuid

@return [String]

@!attribute [rw] links

@return [Hash]

@!attribute [rw] created_on

@return [String]

@!attribute [rw] location

@return [String, NillClass]

@!attribute [rw] type

@return [String]

Public Instance Methods

followers(options = {}) click to toggle source

Get this team's followers.

@param options [Hash] @return [Tinybucket::Resource::Team::Followers]

# File lib/tinybucket/model/team.rb, line 45
def followers(options = {})
  Tinybucket::Resource::Team::Followers.new(username, options)
end
following(options = {}) click to toggle source

Get users which this team is following.

@param options [Hash] @return [Tinybucket::Resource::Team::Following]

# File lib/tinybucket/model/team.rb, line 53
def following(options = {})
  Tinybucket::Resource::Team::Following.new(username, options)
end
members(options = {}) click to toggle source

Get this team's members.

@param options [Hash] @return [Tinybucket::Resource::Team::Members]

# File lib/tinybucket/model/team.rb, line 37
def members(options = {})
  Tinybucket::Resource::Team::Members.new(username, options)
end
project(project_key, options = {}) click to toggle source

Get the project

@param project_key [String] @return [Tinybucket::Model::Project]

# File lib/tinybucket/model/team.rb, line 69
def project(project_key, options = {})
  projects_resource().find(project_key, options)
end
projects(options = {}) click to toggle source

Get projects

@param options [Hash] @return [Tinybucket::Resource::Team::Project]

# File lib/tinybucket/model/team.rb, line 61
def projects(options = {})
  projects_resource(options)
end
repos(options = {}) click to toggle source

Get this team's repositories.

@param options [Hash] @return [Tinybucket::Resource::Team::Repos]

# File lib/tinybucket/model/team.rb, line 77
def repos(options = {})
  Tinybucket::Resource::Team::Repos.new(username, options)
end

Private Instance Methods

load_model() click to toggle source
# File lib/tinybucket/model/team.rb, line 91
def load_model
  team_api.find(username)
end
projects_resource(options = {}) click to toggle source
# File lib/tinybucket/model/team.rb, line 83
def projects_resource(options = {})
  Tinybucket::Resource::Projects.new(username, options)
end
team_api() click to toggle source
# File lib/tinybucket/model/team.rb, line 87
def team_api
  create_api('Team')
end