Skip to content

Incorrect documentation for Search parameters #72

@sortafreel

Description

@sortafreel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions