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

Add ability to filter by author in language tools API #730

Closed
zbraniecki opened this issue Jun 1, 2018 · 6 comments
Closed

Add ability to filter by author in language tools API #730

zbraniecki opened this issue Jun 1, 2018 · 6 comments
Assignees
Labels
component:api priority:p3 This priority level reflects our backlog. state:verified_fixed
Milestone

Comments

@zbraniecki
Copy link

This it the last known issue blocking https://bugzilla.mozilla.org/show_bug.cgi?id=1429610

We need to filter langpacks/dictionaries to only include ones provided by Mozilla RelEng Team when selecting ones to show in Preferences.

aswan says that he's not very opinionated on how to do that - we can probably add an author ID to the query, or get list with authors and filter by it, either should work fine for us.

@diox diox changed the title Add ability in the API to filter by author Add ability to filter by author in language tools API Jun 1, 2018
@diox
Copy link
Member

diox commented Jun 1, 2018

I was hoping to avoid that, it makes the query worse... I guess we still have heavy caching to save us...

@zbraniecki
Copy link
Author

I'm sorry to hear it causes issues.

Are language tools APIs used anywhere else? If not, maybe we could just limited them to Mozilla RelEng provided addons?

@diox
Copy link
Member

diox commented Jun 1, 2018

We have no good way of identifying the add-ons besides the author (IIRC their guids vary), and both fetching and filtering that information are an issue because of the way the tables are set up (and the fact that we fetch a lot of add-ons at once in this API).

However with the caching it's probably not entirely terrible, there will be a slight performance loss on cold cache but it should be bearable. I'll look into it and implement what's less worse :)

@zbraniecki
Copy link
Author

Thank you!

@diox
Copy link
Member

diox commented Jun 20, 2018

Fix will land on dev shortly and be in next week's tag. It adds support for passing author=mozilla query parameter in the language tools API to filter add-ons where the user with the username mozilla is a listed author.

@AlexandraMoga
Copy link

Verified on -dev by sending the following request:

https://addons-dev.allizom.org/api/v4/addons/language-tools/?type=language&app=firefox&author=mozilla

I've looked at some of the results and in all cases Mozilla was listed as author or one of the authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api priority:p3 This priority level reflects our backlog. state:verified_fixed
Projects
None yet
Development

No branches or pull requests

3 participants