Podcastindex-org / docs-api

Developer documentation for the podcastindex.org api.
https://podcastindex-org.github.io/docs-api/
MIT License
52 stars 29 forks source link

Type inconsistency for the /podcasts/bytag endpoint #98

Closed pluto-dev closed 1 year ago

pluto-dev commented 1 year ago

I made the following comment on issue #39, but I don't know if people will see it on a closed issue, so I opened this one instead.

Hey, this issue still seems to exist for following API endpoint:

https://api.podcastindex.org/api/1.0/podcasts/bytag

There a bunch of feeds with "categories": [ ]

Originally posted by @pluto-dev in https://github.com/Podcastindex-org/docs-api/issues/39#issuecomment-1519110010

To be precise, the schema describes it as follows:

An array of categories, where the index is the Category ID and the value is the Category Name.

All Category numbers and names are returned by the categories/list endpoint.

The response we get from the API endpoint and the example both show that we receive an object, except when the collection is empty, in which case we receive and empty array. This is inconsistent with the schema's description, which states that we should receive an array of categories As a result, we cannot rely on the API to provide us with accurate data regarding the /podcasts/bytag endpoint.

daveajones commented 1 year ago

I’ll check it out.

stevencrader commented 1 year ago

They now seem to be returning null instead of []. Can you double check and let us know if it still happens and with which feed.

Thanks

pluto-dev commented 1 year ago

They now seem to be returning null instead of []. Can you double check and let us know if it still happens and with which feed.

Thanks

Seems fine for me now. On 4843 objects i couldn't find any where categories is returning an array. 👍

daveajones commented 1 year ago

Thanks guys.