Class: Tinybucket::Model::Team

Inherits:
Base
  • Object
show all
Defined in:
lib/tinybucket/model/team.rb

Overview

Team

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attributes, #attributes=, concern_included?, #initialize

Constructor Details

This class inherits a constructor from Tinybucket::Model::Base

Instance Attribute Details

#created_onString

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#display_nameString

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#kindString, NillClass

Returns:

  • (String, NillClass)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

Returns:

  • (Hash)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#locationString, NillClass

Returns:

  • (String, NillClass)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#typeString

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#usernameString

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#uuidString

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

#websiteString, NillClass

Returns:

  • (String, NillClass)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/tinybucket/model/team.rb', line 28

class Team < Base
  acceptable_attributes \
    :username, :kind, :website, :display_name, :uuid,
    :links, :created_on, :location, :type

  # Get this team's members.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Members]
  def members(options = {})
    Tinybucket::Resource::Team::Members.new(username, options)
  end

  # Get this team's followers.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Followers]
  def followers(options = {})
    Tinybucket::Resource::Team::Followers.new(username, options)
  end

  # Get users which this team is following.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Following]
  def following(options = {})
    Tinybucket::Resource::Team::Following.new(username, options)
  end

  # Get projects
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Project]
  def projects(options = {})
    projects_resource(options)
  end

  # Get the project
  #
  # @param project_key [String]
  # @return [Tinybucket::Model::Project]
  def project(project_key, options = {})
    projects_resource().find(project_key, options)
  end

  # Get this team's repositories.
  #
  # @param options [Hash]
  # @return [Tinybucket::Resource::Team::Repos]
  def repos(options = {})
    Tinybucket::Resource::Team::Repos.new(username, options)
  end

  private

  def projects_resource(options = {})
    Tinybucket::Resource::Projects.new(username, options)
  end

  def team_api
    create_api('Team')
  end

  def load_model
    team_api.find(username)
  end
end

Instance Method Details

#followers(options = {}) ⇒ Tinybucket::Resource::Team::Followers

Get this team’s followers.

Parameters:

  • options (Hash) (defaults to: {})

Returns:



45
46
47
# File 'lib/tinybucket/model/team.rb', line 45

def followers(options = {})
  Tinybucket::Resource::Team::Followers.new(username, options)
end

#following(options = {}) ⇒ Tinybucket::Resource::Team::Following

Get users which this team is following.

Parameters:

  • options (Hash) (defaults to: {})

Returns:



53
54
55
# File 'lib/tinybucket/model/team.rb', line 53

def following(options = {})
  Tinybucket::Resource::Team::Following.new(username, options)
end

#members(options = {}) ⇒ Tinybucket::Resource::Team::Members

Get this team’s members.

Parameters:

  • options (Hash) (defaults to: {})

Returns:



37
38
39
# File 'lib/tinybucket/model/team.rb', line 37

def members(options = {})
  Tinybucket::Resource::Team::Members.new(username, options)
end

#project(project_key, options = {}) ⇒ Tinybucket::Model::Project

Get the project

Parameters:

  • project_key (String)

Returns:



69
70
71
# File 'lib/tinybucket/model/team.rb', line 69

def project(project_key, options = {})
  projects_resource().find(project_key, options)
end

#projects(options = {}) ⇒ Tinybucket::Resource::Team::Project

Get projects

Parameters:

  • options (Hash) (defaults to: {})

Returns:

  • (Tinybucket::Resource::Team::Project)


61
62
63
# File 'lib/tinybucket/model/team.rb', line 61

def projects(options = {})
  projects_resource(options)
end

#repos(options = {}) ⇒ Tinybucket::Resource::Team::Repos

Get this team’s repositories.

Parameters:

  • options (Hash) (defaults to: {})

Returns:



77
78
79
# File 'lib/tinybucket/model/team.rb', line 77

def repos(options = {})
  Tinybucket::Resource::Team::Repos.new(username, options)
end