site
site copied to clipboard
Add endpoint to fetch filters in JSON format
While this is an API endpoint consumed by the bot, keep it in the
resources app instead of the api app, as all the logic and data for
resources is contained within the resources app and we don't want to
start messing around with that.
The response format from the endpoint is as follows:
{
"topics": [
"algorithms-and-data-structures",
"data-science",
"databases",
"discord-bots",
"game-development",
"general",
"microcontrollers",
"security",
"software-design",
"testing",
"tooling",
"user-interface",
"web-development",
"other"
],
"payment_tiers": [
"free",
"paid",
"subscription"
],
"type": [
"book",
"community",
"course",
"interactive",
"podcast",
"project-ideas",
"tool",
"tutorial",
"video"
],
"difficulty": [
"beginner",
"intermediate"
]
}
Closes #710.
Deploy Preview for pydis-static ready!
| Name | Link |
|---|---|
| Latest commit | c63ab0be5add5f37a11c3e8a7de33bb75a3eccae |
| Latest deploy log | https://app.netlify.com/sites/pydis-static/deploys/66acd9bb1a208e00088dc1fe |
| Deploy Preview | https://deploy-preview-1166--pydis-static.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
coverage: 100.0%. remained the same when pulling c63ab0be5add5f37a11c3e8a7de33bb75a3eccae on resource-filter-fetch into e51d80a99876724283a1aefea3b11a803329c4af on main.
@wookie184 thanks for the review and sorry for the long delay. I've updated the response format, the "sluggified" / "kebabified" version of the names can now be found in the slug field for the respective category, and the filter_slugs field for each filter. To be specific, filter_slugs[3] == to_kebabcase(slugs[3]). Let me know what you think.
Looks like I managed to mess up during rebasing. It should all be fine now, and the code should be a lot simpler thanks to Rohan's changes. Please also see the new response file format.