You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use the sub-category endpoint to serve resources by category (example sub-category page). After we tackle #488, we'll be accessing lists of resources in the web project from two separate endpoints.
It'd be ideal to standardize how we access resources.
Solution
Ideally we'd like to have our current resources endpoint support filtering by sub-category. That way, we can use one endpoint for fetching resources.
API Updates
add an optionalsubcategories query param to the resources endpoint that accepts a string equaling a comma-separated list of subcategories we wish to filter resources by, e.g. /resources?subcategories=emergency,family
The current /resources endpoint currently supports filtering resources by a list of comma-separated IDs and possibly categories due to resources filter by category #488 if that is completed before. We'll need to make sure we also honor the current filtering by ids and categories that exists on this endpoint. This means that if we provide both ids and categories and subcategories as filters, we only return resources that match the passed ids AND belong to one or more of the passed categories AND belong to one or more of the passed subcategories.
Problem
We currently use the sub-category endpoint to serve resources by category (example sub-category page). After we tackle #488, we'll be accessing lists of resources in the web project from two separate endpoints.
It'd be ideal to standardize how we access resources.
Solution
Ideally we'd like to have our current resources endpoint support filtering by sub-category. That way, we can use one endpoint for fetching resources.
API Updates
subcategoriesquery param to the resources endpoint that accepts a string equaling a comma-separated list of subcategories we wish to filter resources by, e.g./resources?subcategories=emergency,familyTech Notes
/resourcesendpoint currently supports filtering resources by a list of comma-separated IDs and possibly categories due to resources filter by category #488 if that is completed before. We'll need to make sure we also honor the current filtering byidsandcategoriesthat exists on this endpoint. This means that if we provide bothidsandcategoriesandsubcategoriesas filters, we only return resources that match the passed ids AND belong to one or more of the passed categories AND belong to one or more of the passed subcategories.