Module: StudyplusForSchoolSync::Endpoint::LearningMaterial

Included in:
StudyplusForSchoolSync::Endpoint
Defined in:
lib/studyplus_for_school_sync/endpoint/learning_material.rb

Instance Method Summary collapse

Instance Method Details

#create_learning_material(name:, **options) ⇒ Hash

Creae learning material

Parameters:

  • name (String)

    learning material name

  • options (Hash)

Options Hash (**options):

  • :image_url (String)
  • :unit (String)
  • :customer_id (String)

Returns:

  • (Hash)

    API response



11
12
13
# File 'lib/studyplus_for_school_sync/endpoint/learning_material.rb', line 11

def create_learning_material(name:, **options)
  post(path: "#{BASE_PAH}/learning_materials", params: options.merge(name: name))
end

#update_learning_material(learning_material_public_id:, name:, **options) ⇒ Hash

Update learning material

Parameters:

  • name (String)

    learning material name

  • options (Hash)

Options Hash (**options):

  • :image_url (String)
  • :unit (String)
  • :customer_id (String)

Returns:

  • (Hash)

    API response



22
23
24
# File 'lib/studyplus_for_school_sync/endpoint/learning_material.rb', line 22

def update_learning_material(learning_material_public_id:, name:, **options)
  put(path: "#{BASE_PAH}/learning_materials/#{learning_material_public_id}", params: options.merge(name: name))
end