Get Started
August 9, 2023 ยท View on GitHub
How to use in GitHub Markdown
template
[](https://youtu.be/{video_id})
example
[](https://youtu.be/8lGpZkjnkt4)
How to use in HTML
template
<a href=https://youtu.be/{video_id}>
<img src=http://markdown-videos-api.jorgenkh.no/youtube/{video_id} />
</a>
example
<a href=https://youtu.be/8lGpZkjnkt4>
<img src=http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4 />
</a>
Preview
<a href=https://youtu.be/8lGpZkjnkt4> <img src=http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4 />
Documentation
For the full documentation see the Swagger and ReDoc docs
- Swagger UI documentation: http://markdown-videos-api.jorgenkh.no/docs
- ReDoc documentation: http://markdown-videos-api.jorgenkh.no/redoc
Optional parameters
| Name | Data Type | Default Value | Description | Example | Availability |
|---|---|---|---|---|---|
| width | int | 320 | The width of the thumbnail | http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4?width=320 | All Endpoints |
| height | int | 180 | The height of the thumbnail | http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4?height=180 | All Endpoints |
| duration | int | 500 | The duration you want to display each image in the gif (in milliseconds) | http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4.gif?duration=500 | Endpoints ending with .gif |
| filetype | str | jpeg | Valid filetypes are: jpeg, jpg, png, webp, bmp, gif | http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4.gif?filetype=jpeg | All still-image endpoints |
| url | str | https://youtu.be/dQw4w9WgXcQ | The url of the video you want the thumbnail of | http://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FdQw4w9WgXcQ&width=320&height=180&filetype=jpeg | /url |
Examples with multiple parameters:
- normal -> http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4?width=320&height=180&filetype=jpeg
- GIF -> http://markdown-videos-api.jorgenkh.no/youtube/8lGpZkjnkt4.gif?width=320&height=180&duration=500
Contributing
Markdown Videos is still under development, please open an issue if you find any bugs, or if you want to suggest new features
Techstack
Local development
It is recommended that you follow the root README
Install pipenv if you haven't already
pip install --user pipenv
Install dependencies
pipenv install
Run Locally
pipenv dev # in development
# run the following in production environment
# pipenv start
ref: https://fastapi.tiangolo.com/#run-it
Running tests
For detailed instructions see the Fast API tutorial for Testing
pipenv test