class Tinybucket::Api::TeamApi

Team Api client

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

teams Endpoint

Public Instance Methods

find(name, options = {}) click to toggle source

Send 'GET the team profile' request

@param name [String] The team's name @param options [Hash] @return [Tinybucket::Model::Team]

# File lib/tinybucket/api/team_api.rb, line 30
def find(name, options = {})
  get_path(
    path_to_find(name),
    options,
    get_parser(:object, Tinybucket::Model::Team)
  )
end
followers(name, options = {}) click to toggle source

Send 'GET the list of followers' request

@param name [String] The team's name @param options [Hash] @return [Tinybucket::Model::Page]

# File lib/tinybucket/api/team_api.rb, line 56
def followers(name, options = {})
  get_path(
    path_to_followers(name),
    options,
    get_parser(:collection, Tinybucket::Model::Team)
  )
end
following(name, options = {}) click to toggle source

Send 'GET a lisf of accounts the team is following' request

@param name [String] The team's name @param options [Hash] @return [Tinybucket::Model::Page]

# File lib/tinybucket/api/team_api.rb, line 69
def following(name, options = {})
  get_path(
    path_to_following(name),
    options,
    get_parser(:collection, Tinybucket::Model::Team)
  )
end
list(role_name, options = {}) click to toggle source

Send 'GET teams' request

@param role_name [String] role name @param options [Hash] @return [Tinybucket::Model::Page]

# File lib/tinybucket/api/team_api.rb, line 17
def list(role_name, options = {})
  get_path(
    path_to_list,
    { role: role_name }.merge(options),
    get_parser(:collection, Tinybucket::Model::Team)
  )
end
members(name, options = {}) click to toggle source

Send 'GET the team members' request

@param name [String] The team's name @param options [Hash] @return [Tinybucket::Model::Page]

# File lib/tinybucket/api/team_api.rb, line 43
def members(name, options = {})
  get_path(
    path_to_members(name),
    options,
    get_parser(:collection, Tinybucket::Model::Team)
  )
end
repos(name, options = {}) click to toggle source

Send 'GET the team's repositories' request

@param name [String] The team's name @param options [Hash] @return [Tinybucket::Model::Page]

# File lib/tinybucket/api/team_api.rb, line 82
def repos(name, options = {})
  get_path(
    path_to_repos(name),
    options,
    get_parser(:collection, Tinybucket::Model::Repository)
  )
end