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

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

Open
ahmedsabriz opened this issue Aug 24, 2024 · 1 comment
Open

Comments

@ahmedsabriz
Copy link
Contributor

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.

@cryptomail
Copy link
Collaborator

If you were to raise a PR that solves your issue and doesn't break other stuff, we should look at it!

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