it returns attachments
GET /api/v1/courses/:course_id/lectures/:lecture_id/attachments
Parameters
| Name |
Description |
|
id
|
id
|
|
course_id
|
id of the course
|
|
lecture_id
|
id of the lecture
|
Request
Headers
Route
GET /api/v1/courses/150/lectures/53/attachments
Query Parameters
{}:
cURL
curl "http://localhost:3000/api/v1/courses/150/lectures/53/attachments" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: tnEsowGcSkFzfBiTDXcvey_JL939Gxshow" \
-H "X-Api-Email: user-33@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"attachments": [
{
"created_at": "2019-10-31T22:01:47Z",
"code_syntax": null,
"content_type": null,
"audio_type": null,
"should_be_uploaded_to_wistia?": false,
"data": null,
"schema": null,
"text_constructor": null,
"full_url": "http://school.worksonmy.computer/courses/150/lectures/53",
"url": null,
"host_id": null,
"source": "user",
"kind": "disqus",
"name": null,
"host": null,
"position": null,
"attachable_id": 53,
"is_published": true,
"downloadable": false,
"text": null,
"attachable_type": "Lecture",
"thumbnail_url": null,
"meta": {
"class": "attachment",
"url": null,
"name": null,
"description": "",
"image_url": null
},
"embeddable": false,
"id": 48,
"plain_text_html": ""
},
{
"created_at": "2019-10-31T22:01:47Z",
"code_syntax": null,
"content_type": "video/mp4",
"audio_type": "video/mp4",
"should_be_uploaded_to_wistia?": false,
"data": null,
"schema": null,
"text_constructor": null,
"full_url": "http://school.worksonmy.computer/courses/150/lectures/53",
"url": "https://filepicker.teachablecdn.com/api/file/ecPcZorTYauJQ59p0cge",
"host_id": "0j4jh5zobq",
"source": "user",
"kind": "video",
"name": "small.mp4",
"host": "wistia",
"position": null,
"attachable_id": 53,
"is_published": true,
"downloadable": false,
"text": null,
"attachable_type": "Lecture",
"thumbnail_url": null,
"meta": {
"class": "attachment",
"url": null,
"name": "small.mp4",
"description": "",
"image_url": null
},
"embeddable": true,
"id": 47,
"plain_text_html": ""
},
{
"created_at": "2019-10-31T22:01:47Z",
"code_syntax": null,
"content_type": null,
"audio_type": null,
"should_be_uploaded_to_wistia?": false,
"data": null,
"schema": null,
"text_constructor": null,
"full_url": "http://school.worksonmy.computer/courses/150/lectures/53",
"url": "http://s3bucket.example.com/example.pdf",
"host_id": null,
"source": "user",
"kind": "file",
"name": "example.pdf",
"host": null,
"position": null,
"attachable_id": 53,
"is_published": true,
"downloadable": true,
"text": null,
"attachable_type": "Lecture",
"thumbnail_url": null,
"meta": {
"class": "attachment",
"url": null,
"name": "example.pdf",
"description": "",
"image_url": null
},
"embeddable": false,
"id": 46,
"plain_text_html": ""
},
{
"created_at": "2019-10-31T22:01:47Z",
"code_syntax": null,
"content_type": null,
"audio_type": null,
"should_be_uploaded_to_wistia?": false,
"data": null,
"schema": null,
"text_constructor": null,
"full_url": "http://school.worksonmy.computer/courses/150/lectures/53",
"url": null,
"host_id": null,
"source": "user",
"kind": "html",
"name": null,
"host": null,
"position": null,
"attachable_id": 53,
"is_published": true,
"downloadable": false,
"text": "This is an html attachment. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tristique erat. Etiam eget euismod metus. Quisque lobortis risus a velit malesuada, nec euismod diam tristique. Nam feugiat ante ut quam lobortis, tempus ullamcorper nunc mollis. Sed eget quam quis sapien sagittis lacinia quis sit amet enim. Maecenas turpis massa, interdum at odio quis, feugiat vestibulum sem. Integer nec faucibus nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras consectetur, tortor non porta hendrerit, magna eros laoreet sapien, sit amet adipiscing arcu mi et mauris. Suspendisse scelerisque enim nec viverra pharetra. Curabitur bibendum elit est. Sed varius arcu viverra, aliquet nibh condimentum, lobortis lorem.",
"attachable_type": "Lecture",
"thumbnail_url": null,
"meta": {
"class": "attachment",
"url": null,
"name": null,
"description": "",
"image_url": null
},
"embeddable": false,
"id": 45,
"plain_text_html": "This is an html attachment. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tristique erat. Etiam eget euismod metus. Quisque lobortis risus a velit malesuada, nec euismod diam tristique. Nam feugiat ante ut quam lobortis, tempus ullamcorper nunc mollis. Sed eget quam quis sapien sagittis lacinia quis sit amet enim. Maecenas turpis massa, interdum at odio quis, feugiat vestibulum sem. Integer nec faucibus nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras consectetur,..."
}
]
}