Module: StudyplusForSchoolSync::Endpoint::Student
- Included in:
- StudyplusForSchoolSync::Endpoint
- Defined in:
- lib/studyplus_for_school_sync/endpoint/student.rb
Instance Method Summary collapse
-
#attach_student_tag(student_id:, tag_id:) ⇒ Hash
Attach student tag.
-
#create_passcode(student_id) ⇒ Hash
Creae passcode.
-
#create_student_transfer(student_id:, partner_id:) ⇒ Hash
Create transfer student.
-
#create_study_record(learning_material_public_id:, student_public_id:, recorded_at:, **options) ⇒ Hash
Create study record.
-
#detach_student_tag(student_id:, tag_id:) ⇒ Hash
Detach student tag.
-
#inactivate_passcode(student_id) ⇒ Hash
Stop passcode.
-
#student_tags(student_id:) ⇒ Hash
Get student tags.
-
#student_transfer(student_id:, transfer_id:) ⇒ Hash
Ge transfer student.
Instance Method Details
#attach_student_tag(student_id:, tag_id:) ⇒ Hash
Attach student tag
54 55 56 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 54 def attach_student_tag(student_id:, tag_id:) put(path: "#{BASE_PAH}/students/#{student_id}/tags/#{tag_id}") end |
#create_passcode(student_id) ⇒ Hash
Creae passcode
7 8 9 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 7 def create_passcode(student_id) post(path: "#{BASE_PAH}/students/#{student_id}/passcode") end |
#create_student_transfer(student_id:, partner_id:) ⇒ Hash
Create transfer student
78 79 80 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 78 def create_student_transfer(student_id:, partner_id:) post(path: "#{BASE_PAH}/students/#{student_id}/transfers", params: { partner_id: partner_id }) end |
#create_study_record(learning_material_public_id:, student_public_id:, recorded_at:, **options) ⇒ Hash
Create study record
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 32 def create_study_record(learning_material_public_id:, student_public_id:, recorded_at:, **) post( path: "#{BASE_PAH}/study_records", params: .merge( learning_material_public_id: learning_material_public_id, student_public_id: student_public_id, recorded_at: recorded_at ) ) end |
#detach_student_tag(student_id:, tag_id:) ⇒ Hash
Detach student tag
62 63 64 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 62 def detach_student_tag(student_id:, tag_id:) delete(path: "#{BASE_PAH}/students/#{student_id}/tags/#{tag_id}") end |
#inactivate_passcode(student_id) ⇒ Hash
Stop passcode
14 15 16 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 14 def inactivate_passcode(student_id) delete(path: "#{BASE_PAH}/students/#{student_id}/passcode") end |
#student_tags(student_id:) ⇒ Hash
Get student tags
46 47 48 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 46 def (student_id:) get(path: "#{BASE_PAH}/students/#{student_id}/tags") end |
#student_transfer(student_id:, transfer_id:) ⇒ Hash
Ge transfer student
70 71 72 |
# File 'lib/studyplus_for_school_sync/endpoint/student.rb', line 70 def student_transfer(student_id:, transfer_id:) get(path: "#{BASE_PAH}/students/#{student_id}/transfers/#{transfer_id}") end |