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 inconsistency: show(query, filters) VS show(filters, query) #9

Open
Jeremie-Kiwik opened this issue Feb 1, 2024 · 1 comment
Open

Comments

@Jeremie-Kiwik
Copy link
Contributor

Hello,
I ran on a problem with playing with the search() methods: some of the API use search(filters, query), while the others use search(query, filters).

So doing generic wrappers around those functions are complicated (for example, if we want to paginate results, we have to identify the api before, to know on which array put the information).

For me, those 2 APIs should have their parameters in the other way, to be as everybody else:

CompaniesApi::show($filters, $query);
IndividualsApi::show($filters, $query);

But modifying this WILL break existing code. So I just give you this information, perhaps for a V2.
For now, I will make a workaround in my own code :)

Best regards,

@tgeorgel
Copy link
Contributor

tgeorgel commented Feb 1, 2024

Hey @Jeremie-Kiwik,
Thanks for pointing that out.
I'll fix this for v1.3 :)

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

No branches or pull requests

2 participants