AnyList

AnyList class. There should be one instance per account.

new AnyList(options: object)

Extends EventEmitter

Parameters
options (object) account options
Name Description
options.email string email
options.password string password
options.credentialsFile string (default path.join(os.homedir(),'.anylist_credentials')) file path for credentials storage file
Properties
lists (Array<List>)
recentItems (Object<string, Array<Item>>)
favoriteItems (Array<List>)
recipes (Array<Recipe>)
Instance Members
â–¸ login(connectWebSocket)
â–¸ teardown()
â–¸ getLists(refreshCache)
â–¸ getListById(identifier)
â–¸ getListByName(name)
â–¸ getFavoriteItemsByListId(identifier)
â–¸ getMealPlanningCalendarEvents(refreshCache)
â–¸ getRecentItemsByListId(listId)
â–¸ createItem(item)
â–¸ getRecipes(refreshCache)
â–¸ createRecipe(recipe)
â–¸ createRecipeCollection(recipeCollection)

AnyList#lists-update

Lists update event (fired when any list is modified by an outside actor). The instance's .lists are updated before the event fires.

AnyList#lists-update

Type: Array<List>

List

List class.

new List(list: object, context: object)
Parameters
list (object) list
context (object) context
Properties
identifier (string)
parentId (string)
name (string)
items (Array<Item>)
Instance Members
â–¸ addItem(item, isFavorite)
â–¸ uncheckAll()
â–¸ removeItem(item, isFavorite)
â–¸ getItemById(identifier)
â–¸ getItemByName(name)

Item

Item class.

new Item(item: object, context: object)
Parameters
item (object) item
context (object) context
Properties
listId (string)
identifier (string)
name (string)
details (string)
quantity (string)
checked (string)
manualSortIndex (string)
userId (string)
categoryMatchId (string)
Instance Members
â–¸ save(isFavorite)

Recipe

Recipe class.

new Recipe(recipe: object, context: object)
Parameters
recipe (object) recipe
context (object) context
Properties
identifier (string)
timestamp (string)
name (string)
note (string)
sourceName (string)
sourceUrl (string)
ingredients (Array<Ingredient>)
preparationSteps (Array<string>)
photoIds (Array<string>)
adCampaignId (string)
photoUrls (Array<string>)
scaleFactor (double)
rating (int)
creationTimestamp (string)
nutritionalInfo (string)
cookTime (int)
prepTime (int)
servings (string)
paprikaIdentifier (string)
Instance Members
â–¸ save()
â–¸ delete()

Ingredient

Ingredient class (in progress).

new Ingredient(ingredient: object, context: object)
Parameters
ingredient (object) ingredient
context (object) context
Properties
rawIngredient (string)
name (string)
quantity (string)
note (string)

RecipeCollection

RecipeCollection class.

new RecipeCollection(recipeCollection: object, context: object)
Parameters
recipeCollection (object) recipeCollection
context (object) context
Properties
identifier (string)
timestamp (string)
name (string)
recipeIds (Array<string>)
preparationSteps (Array<string>)
photoIds (Array<string>)
adCampaignId (string)
photoUrls (Array<string>)
scaleFactor (double)
rating (int)
creationTimestamp (string)
nutritionalInfo (string)
cookTime (int)
prepTime (int)
servings (string)
paprikaIdentifier (string)
Instance Members
â–¸ save()
â–¸ delete()
â–¸ addRecipe(recipeId)
â–¸ removeRecipe(recipeId)

MealPlanningCalendarEvent

Meal Planning Calendar Event class.

new MealPlanningCalendarEvent(event: object, labels: Array<object>, context: object)
Parameters
event (object) event
labels (Array<object>) labels
context (object) context
Properties
identifier (string)
calendarId (string)
date (Date)
details (string?)
labelId (string?)
logicalTimestamp (number?)
orderAddedSortIndex (number?)
recipeId (string?)
recipe (Recipe?)
recipeScaleFactor (number?)
title (string?)

MealPlanningCalendarEventLabel

Meal Planning Calendar Event Label class.

new MealPlanningCalendarEventLabel(label: object)
Parameters
label (object) label
Properties
identifier (string)
calendarId (string)
hexColor (string)
logicalTimestamp (number)
name (string)
sortIndex (number)