Blake Erickson
fe676f334a
FEATURE: Return subcategories on categories endpoint ( #14492 )
...
* FEATURE: Return subcategories on categories endpoint
When using the API subcategories will now be returned nested inside of
each category response under the `subcategory_list` param. We already
return all the subcategory ids under the `subcategory_ids` param, but
you then would have to make multiple separate API calls to fetch each of
those subcategories. This way you can get **ALL** of the categories
along with their subcategories in a single API response.
The UI will not be affected by this change because you need to pass in
the `include_subcategories=true` param in order for subcategories to be
returned.
In a follow up PR I'll add the API scoping for fetching categories so
that a readonly API key can be used for the `/categories.json` endpoint. This
endpoint should be used instead of the `/site.json` endpoint for
fetching a sites categories and subcategories.
* Update PR based on feedback
- Have spec check for specific subcategory
- Move comparison check out of loop
- Only populate subcategory list if option present
- Remove empty array initialization
- Update api spec to allow null response
* More PR updates based on feedback
- Use a category serializer for the subcategory_list
- Don't include the subcategory_list param if empty
- For the spec check for the subcategory by id
- Fix spec to account for param not present when empty
2021-10-05 12:12:31 -06:00
..
2021-09-09 09:16:53 +08:00
2021-04-12 12:50:33 +10:00
2021-07-09 14:34:08 +01:00
2019-08-28 12:37:42 +01:00
2019-05-13 09:31:32 +08:00
2020-07-20 15:23:49 -06:00
2019-05-29 14:26:24 +10:00
2021-07-16 11:10:04 +08:00
2020-10-19 10:40:55 +01:00
2020-05-23 00:56:13 -04:00
2019-10-02 14:01:53 +10:00
2019-10-17 16:58:21 +11:00
2019-10-17 16:58:21 +11:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2020-09-10 21:37:48 +02:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-08-04 22:24:47 +02:00
2020-09-23 12:00:07 +03:00
2021-09-21 08:45:47 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-06-24 15:51:30 +10:00
2019-10-23 10:30:43 +01:00
2021-10-05 12:12:31 -06:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-06-24 13:30:51 +08:00
2019-05-13 09:31:32 +08:00
2021-06-24 13:30:51 +08:00
2021-05-14 09:45:14 +10:00
2021-10-05 12:12:31 -06:00
2019-05-13 09:31:32 +08:00
2020-08-20 17:10:33 -07:00
2020-08-07 08:52:47 -04:00
2021-08-25 17:10:12 -04:00
2020-04-28 15:59:39 +05:30
2019-11-29 15:49:08 +00:00
2019-10-02 14:01:53 +10:00
2021-07-06 10:11:06 +01:00
2021-06-22 13:00:04 -05:00
2021-08-18 18:44:12 +05:30
2019-05-13 09:31:32 +08:00
2021-02-04 11:27:34 +11:00
2021-07-06 10:11:06 +01:00
2021-08-04 13:30:37 +03:00
2021-09-14 15:18:01 +03:00
2021-08-04 19:14:56 -04:00
2019-10-02 14:01:53 +10:00
2021-06-28 10:42:06 +10:00
2019-10-23 19:22:33 -04:00
2021-04-21 12:36:32 +03:00
2021-07-16 15:25:49 -03:00
2020-07-27 10:23:54 +10:00
2021-02-26 07:44:52 -05:00
2021-07-21 23:27:20 +02:00
2021-08-25 11:11:19 +10:00
2019-05-13 09:31:32 +08:00
2021-04-14 13:31:32 -04:00
2021-09-10 09:20:50 +08:00
2020-08-06 12:27:27 -04:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-08-06 12:27:27 -04:00
2021-09-21 09:29:12 +08:00
2021-09-21 09:29:12 +08:00
2021-07-06 10:11:06 +01:00
2021-01-21 11:37:47 +10:00
2019-05-14 17:44:53 +02:00
2021-07-06 10:11:06 +01:00
2019-10-21 12:08:20 +01:00
2020-04-22 11:52:50 +03:00
2019-05-13 09:31:32 +08:00
2021-07-12 07:57:38 +10:00
2021-07-06 12:49:26 +03:00
2021-03-09 00:15:14 +02:00
2021-03-06 13:29:35 +02:00
2020-10-09 12:51:24 +01:00
2019-10-02 14:01:53 +10:00
2020-11-02 12:18:48 +05:30
2021-01-20 21:32:22 +01:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2021-09-14 09:57:38 -05:00
2019-10-25 11:57:34 +11:00
2019-05-13 09:31:32 +08:00
2021-06-04 15:13:58 +03:00
2021-03-29 13:36:59 -05:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-06-04 09:14:49 +08:00
2021-04-22 15:53:44 +05:30
2021-04-14 10:27:07 +03:00
2021-07-06 10:11:06 +01:00
2019-05-13 09:31:32 +08:00
2021-09-15 10:16:54 +10:00
2019-05-13 09:31:32 +08:00
2020-11-09 15:57:59 +11:00
2021-08-02 10:15:53 -04:00
2020-10-27 23:42:33 +05:30
2019-05-13 09:31:32 +08:00
2021-08-26 10:50:34 -05:00
2019-05-13 09:31:32 +08:00
2021-07-26 21:39:51 +05:30
2019-10-02 14:01:53 +10:00
2021-09-29 13:54:24 +08:00
2021-04-21 12:36:32 +03:00
2021-07-06 10:11:06 +01:00
2020-05-05 13:46:57 +10:00
2021-04-28 17:07:27 -07:00
2019-10-02 14:01:53 +10:00
2020-12-09 10:54:41 -06:00
2020-01-09 12:32:05 -05:00
2021-07-06 10:11:06 +01:00
2020-02-10 15:40:01 -08:00
2021-07-06 10:11:06 +01:00
2019-10-02 14:01:53 +10:00
2021-07-06 10:11:06 +01:00
2020-07-02 11:47:43 -03:00
2019-10-02 14:01:53 +10:00
2021-07-06 10:11:06 +01:00
2021-07-16 19:57:12 +03:00
2021-09-16 12:33:43 -04:00
2021-07-06 10:11:06 +01:00
2020-07-27 10:23:54 +10:00
2019-10-02 14:01:53 +10:00
2019-12-03 10:05:53 +01:00
2019-05-13 09:31:32 +08:00
2021-07-06 10:11:06 +01:00
2019-05-13 09:31:32 +08:00
2020-09-24 01:58:53 +03:00
2021-09-17 10:34:04 +08:00
2021-07-05 14:56:32 +10:00
2019-10-02 14:01:53 +10:00
2021-07-16 10:58:01 -04:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-03-13 12:25:58 -04:00
2019-05-13 09:31:32 +08:00
2021-05-14 09:45:14 +10:00
2021-08-02 12:41:41 +08:00
2021-07-26 12:35:27 +10:00
2021-07-06 10:11:06 +01:00
2020-04-15 18:34:02 +05:30
2020-12-17 11:02:41 +11:00
2021-10-05 11:25:00 -04:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-07-23 14:24:44 -04:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-04-03 16:42:01 +01:00
2021-07-06 10:11:06 +01:00
2021-10-01 12:48:21 -03:00
2019-05-13 09:31:32 +08:00
2019-12-13 11:51:40 -05:00
2019-05-13 09:31:32 +08:00
2021-07-06 10:11:06 +01:00
2021-06-02 15:27:04 +04:00
2021-08-25 13:16:08 +03:00
2019-05-13 09:31:32 +08:00
2020-07-17 10:48:08 +01:00
2021-02-02 10:50:04 +01:00
2021-08-25 13:16:08 +03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-05-26 16:19:05 +10:00
2021-06-29 09:16:25 +10:00
2021-09-09 09:16:53 +08:00
2021-09-09 09:16:53 +08:00
2020-04-07 17:36:07 -04:00
2021-10-04 11:40:22 +08:00
2021-03-25 14:00:05 -04:00
2020-08-12 11:28:34 -03:00
2021-08-24 10:46:28 +03:00
2021-06-01 22:11:48 +02:00
2021-06-01 22:11:48 +02:00
2019-05-13 09:31:32 +08:00
2021-09-16 07:58:53 +05:30
2021-09-29 16:24:28 +04:00
2020-10-21 19:44:34 +01:00
2020-10-27 23:42:33 +05:30
2021-09-10 09:20:50 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-05-21 11:43:47 +10:00
2021-06-04 15:13:58 +03:00
2021-07-06 10:11:06 +01:00
2019-05-13 09:31:32 +08:00
2021-01-19 08:53:49 +10:00
2021-07-06 10:11:06 +01:00
2021-02-22 11:42:37 +00:00
2019-07-25 19:41:25 +05:30
2021-07-30 13:50:47 -04:00
2021-06-07 12:34:01 -05:00
2021-07-06 10:11:06 +01:00
2020-10-27 23:42:33 +05:30
2021-07-06 10:11:06 +01:00
2020-02-07 17:32:35 +00:00
2021-09-06 21:51:52 +04:00
2019-12-03 10:05:53 +01:00
2021-06-04 15:13:58 +03:00
2019-05-13 09:31:32 +08:00
2021-07-21 09:14:53 -04:00
2020-01-10 10:45:56 +10:00
2019-10-17 16:58:22 +11:00
2021-08-02 10:15:53 -04:00
2021-07-08 10:46:21 +03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2021-08-12 14:20:46 -03:00
2020-07-27 10:23:54 +10:00
2021-06-30 11:22:46 +05:30
2019-12-03 10:05:53 +01:00
2021-04-30 17:08:38 -07:00
2019-05-13 09:31:32 +08:00
2021-04-30 17:08:38 -07:00