Skip to content

feat: add category and warning filters to Search#127

Open
Tubring25 wants to merge 1 commit into
wendytg:masterfrom
Tubring25:feature/search-filters
Open

feat: add category and warning filters to Search#127
Tubring25 wants to merge 1 commit into
wendytg:masterfrom
Tubring25:feature/search-filters

Conversation

@Tubring25

Copy link
Copy Markdown

What does this PR do

Added support for filtering search result by Categories (e.g. F/F, M/M) and Warnings (e.g. Major Character Death)

How to test

You can test the new filters by the following snippet:

import AO3
from AO3.search import CATEGORY_FF, WARNING_VIOLENCE

# Test Category filter
search = AO3.Search(any_field="magic", category_ids=CATEGORY_FF)
search.update()
print(f"Results with FF category: {search.total_results}")

# Test Warning filter
search_warn = AO3.Search(any_field="war", warning_ids=[WARNING_VIOLENCE])
search_warn.update()
print(f"Results with Violence warning: {search_warn.total_results}")

#118

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.

1 participant