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

Feature: Shopping List Item Pagination Route #2145

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Adds a pagination route for shopping list items. This is particularly useful to query for only unchecked items, i.e. checked=false (which is generally what you want in an external app).

Which issue(s) this PR fixes:

(REQUIRED)

N/A

Testing

(fill-in or delete this section)

Pytest

Release Notes

(REQUIRED)

added API route for querying shopping list items

@@ -177,6 +177,10 @@ class ShoppingListItemsCollectionOut(MealieModel):
deleted_items: list[ShoppingListItemOut] = []


class ShoppingListItemPagination(PaginationBase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There really is no need for this, since PaginationBase is generic to begin with and this subclass doesnt add anything in particular. You can just use PaginationBase[ShoppingListItemOut] instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the only reason I added it is because we have them for all other get_all routes, so I wanted to keep it consistent with the rest of the code base

@hay-kot hay-kot merged commit 35124ea into mealie-recipes:mealie-next Feb 20, 2023
@michael-genson michael-genson deleted the feat/shopping-list-item-query branch February 20, 2023 01:54
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