🌐 AI搜索 & 代理 主页
Skip to content

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.

3 participants