Skip to content

Add filters to logo placement API #1984

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

Merged
merged 4 commits into from
Feb 14, 2022
Merged

Conversation

berinhard
Copy link
Contributor

This PR adds filter options to /api/v2/sponsors/logo-placement/. Now clients can filter by publisher and logo_place via querystring. Both filters are optional, but if they are being used in a request with invalid values the request will be treated as a bad request.

The filters will be handful for pypi to filter by their logos and use the API data to place sponsors logo. The following request's, for example, will return only the sponsors which should be displayed at Pypi's sponsors page:

localhost:8000/api/v2/sponsors/logo-placement/?publisher=pypi&logo_place=sponsors

@berinhard berinhard requested a review from ewdurbin February 12, 2022 20:58
This change is also present at #1981, but since pypi integration also needs
it, I decided to duplicate it to not have the integration between services
pending on an open PR.
@ewdurbin ewdurbin merged commit 3a42133 into main Feb 14, 2022
@ewdurbin ewdurbin deleted the feature/logo-placement-api-filters branch February 14, 2022 13:34
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

Successfully merging this pull request may close these issues.

2 participants