Class: Wanikani::RecentUnlocks

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

Class Method Summary collapse

Class Method Details

.full_response(limit = 10) ⇒ Hash

Gets the full response of the Recents Unlocks List API call.

Parameters:

  • limit (Integer) (defaults to: 10)

    the total number of items returned.

Returns:

  • (Hash)

    Full response from the Recent Unlocks List API call.



17
18
19
# File 'lib/wanikani/recent_unlocks.rb', line 17

def self.full_response(limit = 10)
  return Wanikani.api_response("recent-unlocks", limit)
end

.list(limit = 10) ⇒ Array

Gets the recent unlocked items (radicals, Kanji and vocabulary).

Parameters:

  • limit (Integer) (defaults to: 10)

    the total number of items returned.

Returns:

  • (Array)

    Returns hashes of unlocked items and related information.



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

def self.list(limit = 10)
  api_response = Wanikani.api_response("recent-unlocks", limit)
  return api_response["requested_information"]
end