Class: LingutestClient::Examination
- Defined in:
- lib/lingutest_client/examination.rb
Constant Summary collapse
- OBJECT_NAME =
:examination
- STATUSES =
%w[ pending in_progress completed pending_review reviewed ].freeze
- CreateSchema =
Dry::Schema.Params do required(:exam_id).filled(Types::Coercible::Integer) required(:candidate_id).filled(Types::Coercible::Integer) required(:expires_at).filled(Types::DateTime) optional(:redirect_url).filled(Types::Url) optional(:team_id).filled(Types::Coercible::String) optional(:team_group_id).filled(Types::Coercible::String) optional(:student_id).filled(Types::Coercible::String) end
- FilterSchema =
Dry::Schema.Params do config.validate_keys = true optional(:page).filled(Types::Coercible::Integer) optional(:per_page).filled(Types::Coercible::Integer) optional(:team_id_eq).filled(Types::Coercible::String) optional(:team_group_id_eq).filled(Types::Coercible::String) optional(:student_id_eq).filled(Types::Coercible::String) optional(:candidate_id_eq).filled(Types::Coercible::String) optional(:price_gteq).filled(Types::Coercible::Integer) optional(:created_at_gteq).filled(Types::DateTime) optional(:created_at_lteq).filled(Types::DateTime) end
Instance Method Summary collapse
Methods included from Api::Operations::Find
Methods included from Api::Operations::Create
Methods included from Api::Resource
Methods inherited from Base
Instance Method Details
#result_url ⇒ Object
71 72 73 |
# File 'lib/lingutest_client/examination.rb', line 71 def result_url URI.join(LingutestClient.config.api_base.to_s, "/examinations/#{code}").to_s end |
#url ⇒ Object
67 68 69 |
# File 'lib/lingutest_client/examination.rb', line 67 def url URI.join(LingutestClient.config.api_base.to_s, "/#{code}").to_s end |