should return all unpublished and published
GET /api/v1/courses/:course_id/lectures
Parameters
| Name |
Description |
|
id
|
id
|
|
course_id
|
course id
|
|
name
|
Lecture section Name
|
|
is_published
|
publically viewable?
|
|
attachments_attributes
|
attachments attributes
|
Request
Headers
Route
GET /api/v1/courses/256/lectures?id=66
Query Parameters
id: 66
cURL
curl "http://localhost:3000/api/v1/courses/256/lectures?id=66" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: 9Q_Qysw15_1xpGQG1orSRdh2hQ48jE8MLw" \
-H "X-Api-Email: user-586@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"lectures": [
{
"created_at": "2019-10-31T22:05:52Z",
"name": "Lecture Name 16",
"download": false,
"free_preview": false,
"description": "Lecture Description",
"course_id": 256,
"position": 1,
"is_published": false,
"lecture_section_id": 307,
"id": 66,
"meta": {
"class": "lecture",
"url": "/courses/256/lectures/66",
"name": "Lecture Name 16",
"description": "Lecture Description",
"image_url": null
}
}
]
}