Class: Tinybucket::Model::Profile

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

Overview

Profile

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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  end
end

#kindNillClass

Returns:

  • (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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  end
end

#locationString

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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  end
end

#websiteString

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
# File 'lib/tinybucket/model/profile.rb', line 28

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

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

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

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

  private

  def user_api
    create_api('User').tap do |api|
      api.username = username
    end
  end

  def load_model
    user_api.profile
  end
end

Instance Method Details

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

Get this user's followers

Parameters:

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

Returns:


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

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

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

Get users which this user is following

Parameters:

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

Returns:


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

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

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

Get this user's repositories

Parameters:

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

Returns:


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

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