Class: Wanikani::Level

Inherits:
Object
  • Object
show all
Defined in:
lib/wanikani/level.rb

Class Method Summary collapse

Class Method Details

.full_responseHash

Gets the full response of the Level Progression API call.

Returns:

  • (Hash)

    Full response from the Level Progression API call.



16
17
18
# File 'lib/wanikani/level.rb', line 16

def self.full_response
  return Wanikani.api_response("level-progression")
end

.progressionHash

Gets the user’s current level progression (radicals and Kanji).

Returns:

  • (Hash)

    Progress and total of radicals and Kanji for the user’s current level.



7
8
9
10
11
# File 'lib/wanikani/level.rb', line 7

def self.progression
  api_response = Wanikani.api_response("level-progression")
  current_level = { "current_level" => api_response["user_information"]["level"] }
  return api_response["requested_information"].merge(current_level)
end