Skip to content

πŸ“‹ a wrapper for AnyList's API (unoffical, reverse engineered)

Notifications You must be signed in to change notification settings

SRGDamia1/anylist

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ AnyList

a wrapper for AnyList's API (unoffical, reverse engineered)

Install

npm i anylist

Getting Started

Here's an example script (replace email and password with your credentials):

const AnyList = require('anylist');

const any = new AnyList({email: '[email protected]', password: 'password'});

any.on('lists-update', lists => {
  console.log('Lists were updated!');
});

any.login().then(async () => {
  await any.getLists();

  // Add new item to the Walmart list
  const walmart = any.getListByName('Walmart');

  let chips = any.createItem({name: 'Chips'});

  chips = await walmart.addItem(chips)

  // Check off added item
  chips.checked = true;
  // And change the quantity
  chips.quantity = '2';
  // Save updated item
  await chips.save();

  // Delete item
  await walmart.removeItem(chips);

  any.teardown();
});

Notes/Tips

  • There is much more functionality in the AnyList API that is not captured in this package, I just implimented the functions that I would be using. If there is functionality missing that you want, please open a PR and I'm happy to merge it in.
    • (This means that you can't currently add/remove/update lists.)
  • When adding new items, you should reuse existing, checked-off items if possible like the offical clients do. Search the list by the item name with list.getItemByName('item-name') to see if it exists before adding a new instance.

πŸ“– Docs

Documentation

About

πŸ“‹ a wrapper for AnyList's API (unoffical, reverse engineered)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%