V1::LessonsController
Lessons
show
View a lesson
URL
GET /lessons/:id or /school_products/:school_product_id/lessons/:id or /enrollments/:enrollment_id/lessons/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | Identifier the lesson |
Objeto resposta
Lesson | The requested lesson |
create
Create {Lesson lesson}
URL
POST /lessonsParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
lesson | Hash | The lesson to create |
lesson[title] | String | Title of the lesson |
lesson[type] | String | Type of the lesson |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
lesson[description] | Text | Description of the lesson |
lesson[available] | Boolean | Available of the lesson |
lesson[media_id] | Integer | Media of the lesson |
lesson[min_grade] | Integer | Min grade of the lesson |
lesson[unlock_certificate] | Boolean | Unlock certificate of the lesson |
lesson[release_at] | DateTime | Date when lesson will be released to student |
lesson[release_after] | Integer | Number of days after enrollment when lesson will be released to student |
update
Update an existing {Lesson lesson}
URL
PUT/PATCH /lesson/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
lesson | Hash | The lesson to update |
lesson[title] | String | Title of the lesson |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
lesson[type] | String | Type of the lesson |
lesson[description] | Text | Description of the lesson |
lesson[available] | Boolean | Available of the lesson |
lesson[media_id] | Integer | Media of the lesson |
lesson[min_grade] | Integer | Min grade of the lesson |
lesson[unlock_certificate] | Boolean | Unlock certificate of the lesson |
lesson[release_at] | DateTime | Date when lesson will be released to student |
lesson[release_after] | Integer | Number of days after enrollment when lesson will be released to student |
destroy
Delete lesson
URL
DELETE /lesson/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | Id of an lesson |
index
Get a list of lessons
URL
GET /lessons/ or /school_products/:school_product_id/lessons/ or /enrollments/:enrollment_id/lessons/Objeto resposta
Array<Lesson> | The created lesson |