feat: add createList, deleteList, and List.rename methods#1
Open
asachs01 wants to merge 1 commit intobobby060:masterfrom
Open
feat: add createList, deleteList, and List.rename methods#1asachs01 wants to merge 1 commit intobobby060:masterfrom
asachs01 wants to merge 1 commit intobobby060:masterfrom
Conversation
- createList(name): Creates a new shopping list via PBListOperation with 'new-shopping-list' handler. Returns the created List instance. - deleteList(list): Deletes a shopping list by removing it from its parent folder via PBListFolderOperation with 'delete-folder-items' handler. - List.rename(newName): Renames a list via PBListOperation with 'rename-list' handler. - Extract uid from JWT token during login() so operations include the correct userId in operation metadata.
Owner
|
@asachs01 Just a heads up that this repo is a fork of the real anylist-js repo (I just had to remove stdout prints to make it work with mcp). I will try to merge this here shortly, but the upstream repo might benefit from it too |
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
Adds three new methods for managing shopping lists:
createList(name)Creates a new shopping list. Uses
PBListOperationwith thenew-shopping-listhandler, which is the same mechanism the AnyList web app uses internally.deleteList(list)Deletes a shopping list by removing it from its parent folder via
PBListFolderOperationwith thedelete-folder-itemshandler. Automatically determines the correct parent folder.List.rename(newName)Renames an existing list via
PBListOperationwith therename-listhandler.Other changes
uidfrom the JWT access token duringlogin()so that operation metadata includes the correctuserId. This was previouslyundefinedfor all operations.How this was discovered
Reverse-engineered from the AnyList web app (
app.min.js) by extracting handler ID strings and tracing the protobuf operation patterns. All three operations were tested end-to-end against the live API (create → rename → delete).