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

how to get categories by page #56

Open
Tracked by #76
jerome-diver opened this issue May 7, 2019 · 5 comments
Open
Tracked by #76

how to get categories by page #56

jerome-diver opened this issue May 7, 2019 · 5 comments

Comments

@jerome-diver
Copy link

i can get how to have categories by page with page_size. running facets.get_categories() is very long, i would like to load page by page my view from a thread...
thank you

@Anubhav-Bhargava
Copy link
Member

Hey @jerome-diver Can you please elaborate and provide some examples, if possible?

@jerome-diver
Copy link
Author

@Anubhav-Bhargava i can imagine what could be a request, but i can not give an example about something i don't know how it is working.
I would like to get categories facets by page for a given page_size, and for selected country and/or selected langage (and sorted_by category name):
french_categories_page2 = openfoodfacts.factes.get_categories(country="France", page=2, page_size=25, sorted_by='name')

@jerome-diver
Copy link
Author

@Anubhav-Bhargava, i answered but you didn't tell me how to get products by categories for a defined country with the total products count number. Could you help me with that please ?

@Anubhav-Bhargava
Copy link
Member

@jerome-diver Currently there is no such functionality available. I've raised a request with the team to look into it.
Will update you if there's any progress.

@teolemon
Copy link
Member

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

No branches or pull requests

4 participants