Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: category id type #1139

Open
jangernert opened this issue Aug 13, 2023 · 1 comment
Open

API: category id type #1139

jangernert opened this issue Aug 13, 2023 · 1 comment

Comments

@jangernert
Copy link

The ids of feeds & entries is i64 while categories are inconsistent. Sometimes its a string and other times i64. I feel like categories should also have an i64 id property.

I guess this exception was done to be able to represent the "all" category? If that's the only case, maybe /category/get should just return the top level categories & top level feeds? Or maybe reserve the id 0 or -1 for "all"?

@Athou
Copy link
Owner

Athou commented Aug 14, 2023

You're right it's inconsistent and it's indeed because there are the 'all' and 'starred' categories.
Actually I feel like moving to a string id across the board instead of a long number would be the way to go, as it would prevent the need for special numeric values.

Probably for 4.x though since it would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants