Conversation
- Add `appie order` (show active/next order), `order list`, `order use` - Add GetOrderDetails for per-item pricing via taxonomy endpoint - Use API-provided TotalPrice/TotalDiscount for correct totals - Deduplicate types: remove imageResponse, inline Address/DeliverySlot - Add Order.Subtotal() method and testdata fixture
Accepts a numeric product ID or search term. Single match adds directly; multiple matches show a price-sorted table with sizes. Also fixes duplicate error printing in main.go (go-flags' PrintErrors already handles it).
Adds `appie search <query> -n N` (default 20 results). Extracts printProducts helper from order add for reuse.
Add GetShoppingListItems via favoriteListV2 GraphQL query, fix getShoppingList to populate items (unbreaks ClearShoppingList and ShoppingListToOrder), and fix GetProductsByIDs response decoding. Also fix duplicate integration test names for receipts.
All resource commands now follow a consistent pattern: - bare command shows overview with IDs - show <id> for detail view - add <id> <item> for mutations - rm <id> <item> for removal order: replace list/use/add with show/add/rm subcommands, add ensureOrderOpen helper that reopens and sets order ID list: replace name-based prefix matching with exact UUID, use positional list-id for show/add/rm instead of -l flag receipt: extract show subcommand from optional positional arg Also fix favorite list API: - RemoveFromFavoriteList via GraphQL (favoriteListProductsDeleteV2) replacing broken REST v3 endpoint - AddToFavoriteList now sends quantity field
Bare `appie receipt <id>` silently ignored the argument due to subcommands-optional. Now all resource commands reject unexpected positional args with a hint to use `show`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ordercommand: bare lists open orders,showorder contents,addproducts by ID or search,rmproducts (reopens submitted orders automatically)listcommand: bare lists shopping lists with UUIDs,showitems,addproducts with quantity,rmby product IDsearchcommand for product search with tabular output<resource> [show|add|rm] <id>patternAddToFavoriteListto send quantity fieldfavoriteListProductsDeleteV2GetProductsByIDsresponse decoding (bare array, not wrapped object)getShoppingListto populate items via GraphQLCLI conventions
Test plan
findListexact UUID match and rejection of prefixesorder_test.go)shoppinglist_test.go)TestGetShoppingListItems)appie order,appie order show <id>,appie order add <id> <product>,appie order rm <id> <product-id>appie list,appie list show <uuid>,appie list add <uuid> <product> -n 3,appie list rm <uuid> <product-id>appie receipt,appie receipt show <txn-id>appie search <query>