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

Incorrect documentation for Search parameters #72

Open
sortafreel opened this issue May 18, 2022 · 0 comments
Open

Incorrect documentation for Search parameters #72

sortafreel opened this issue May 18, 2022 · 0 comments

Comments

@sortafreel
Copy link

I need to filter entries by Content Type and fields existence. So, the expected code, that API documentation suggests is:

client.entries({'content_type': '<content_type_id>', 'fields.tags[exists]': True})

or, if real-life example:

client.entries(query={"content_type": "surveyTemplate", "fields.survey_id[exists]": True})

But the query doesn't work, because [exists] part is being ignored. To make it work, you need to change True to "true", which is a bit unexpected. So, the code needs to look like this:

client.entries(query={"content_type": "surveyTemplate", "fields.survey_id[exists]": "true"})

I assume, that's not the only example of incorrect bool to text conversion, but one of the easiest ones to check. So, I suggest either to fix the documentation to mirror the actually expected input, or fixing the library to make bool values work.

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

1 participant