Class: Renshuu::Profile

Inherits:
Model
  • Object
show all
Defined in:
lib/renshuu/models/profile.rb

Overview

Model class for user profiles.

Defined Under Namespace

Classes: APIUsage, Progress, Streak, StudyCount

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#adventure_levelString (readonly)

Returns:

  • (String)


27
# File 'lib/renshuu/models/profile.rb', line 27

attribute :adventure_level, Types::String

#api_usageAPIUsage (readonly)

Returns:



172
# File 'lib/renshuu/models/profile.rb', line 172

attribute :api_usage, APIUsage

#idString (readonly)

Returns:

  • (String)


19
# File 'lib/renshuu/models/profile.rb', line 19

attribute :id, Types::String

#kaoURI (readonly)

Returns:

  • (URI)


35
# File 'lib/renshuu/models/profile.rb', line 35

attribute :kao, Types::URI

#level_progress_percsHash{String => Progress} (readonly)

Returns:



122
# File 'lib/renshuu/models/profile.rb', line 122

attribute :level_progress_percs, Types::Hash.map(Types::String, Progress)

#real_nameString (readonly)

Returns:

  • (String)


23
# File 'lib/renshuu/models/profile.rb', line 23

attribute :real_name, Types::String

#streaksHash{String => Streak} (readonly)

Returns:



147
# File 'lib/renshuu/models/profile.rb', line 147

attribute :streaks, Types::Hash.map(Types::String, Streak)

#studiedStudyCount (readonly) Also known as: study_count

Returns:



92
# File 'lib/renshuu/models/profile.rb', line 92

attribute :studied, StudyCount

#user_lengthString (readonly)

Returns:

  • (String)


31
# File 'lib/renshuu/models/profile.rb', line 31

attribute :user_length, Types::String

Class Method Details

.getProfile

Returns:



11
12
13
14
# File 'lib/renshuu/models/profile.rb', line 11

def self.get
  body = Renshuu.client.query(:get, 'v1/profile')
  new(body)
end