Module: Wanikani::Assignment

Extended by:
Shared
Defined in:
lib/wanikani/models/assignment.rb

Constant Summary collapse

PERMITTED_PARAMS =
%w[available_after available_before burned hidden ids immediately_available_for_lessons immediately_available_for_review in_review levels passed srs_stages started subject_ids subject_types unlocked updated_after page_after_id page_before_id].freeze

Class Method Summary collapse

Methods included from Shared

client, filter, permitted_params, respond

Class Method Details

.find(id) ⇒ Object



20
21
22
# File 'lib/wanikani/models/assignment.rb', line 20

def self.find(id)
  respond(client.get("assignments/#{id}"))
end

.find_allObject



12
13
14
# File 'lib/wanikani/models/assignment.rb', line 12

def self.find_all
  find_by
end

.find_by(parameters = {}) ⇒ Object



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

def self.find_by(parameters = {})
  respond(client.get('assignments', filter(parameters)))
end

.permitted_paramsObject



8
9
10
# File 'lib/wanikani/models/assignment.rb', line 8

def self.permitted_params
  PERMITTED_PARAMS
end