Skip to content

Unable to search all articles in a section without specifying locale #648

@ahmedsabriz

Description

@ahmedsabriz

I would like to get all articles in a section without specifying a locale because I have some articles in en-us and other source articles in other locales which are specific to their markets.

If I use articles = client.help_center.sections.articles(section=section_id) it will return articles in en-us as the default locale. I am also unable to sideload translations.

As a temporary solutions, I changed articles method in SectionsApi from

    def articles(self, section, locale='en-us'):
        return self._query_zendesk(self.endpoint.articles,
                                   'article',
                                   id=section, locale=locale)

to

    def articles(self, section, *args, **kwargs):
        return self._query_zendesk(self.endpoint.articles,
                                   'article',
                                   id=section, *args, **kwargs)

However, it makes the sideloading solution inconsistent with primary endpoints for not accepting lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions