Code Monkey home page Code Monkey logo

anylist's People

Contributors

ajorpheus avatar brianespinoza avatar codetheweb avatar dependabot[bot] avatar jchadwick avatar kevdliu avatar tb-money avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anylist's Issues

Issue with Creating Recipes - Uncertain if code work

I am writing to report an issue I am facing when trying to create recipes. I am currently in the process of determining whether the code has ever worked or if this issue has been persistent. Here is a more detailed description of the situation:

Symptoms:
When attempting to create a new recipe, nothing happens.
I do not receive any specific error message, making troubleshooting more challenging.
I tried with the example code as well.

Steps Taken So Far:
I managed to create items, not recipes

If you require further information, please do not hesitate to contact me.

Thank you in advance for your help.

Meal Planning Calendar

Hi, curious if you have any plans or interest in adding support for the Meal Planning Calendar?

Example code does not run

I'm a Nodejs novice and had issues getting anylist to be installed on a Fedora 31 system (nodejs-12.16.1-1.fc31.x86_64) so I went to my old RHEL 6.4 system and installed it there which had nodejs-0.10.48-3.el6.x86_64 installed. While the install was successful I could not run the example code I got this error:

serv%~/src/anylist > node testanylist.js

~/src/anylist/testanylist.js:5
any.on('lists-update', lists => {
                              ^
const AnyList = require('anylist');
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3

My understanding of the issue is a syntax is being used that is not supported by the version of Nodejs installed. Assuming the version of Nodejs was indeed good enough to install anylist on then I suggest the example code / README.md be updated to include the minimum required version to run the example. Otherwise the minimum version for anylist should be updated. If nothing else what version of Nodejs are you using that anylist can be installed with and the example will run?

No stdout for node v18

Hi, I tried to run the following code but nothing happened nor did I get any stdout/stderr:

const AnyList = require('anylist');

const any = new AnyList({email: '<email>', password: '<pw>'});

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('Task');
  let chips = any.createItem({name: 'Chips'});
  chips = await walmart.addItem(chips)
  await chips.save();

  any.teardown();
});

I installed the anylist package and ran this in my terminal on Linux:

╭─mike@asus ~/temp/anylist  ‹master*›
╰─➤  node --version
v18.9.1
╭─mike@asus ~/temp/anylist  ‹master*›
╰─➤  node script.js

Could you please let me know if I need to do anything differently?

Google Apps Script

Is there a way to make this Google Apps Script friendly?
I'm hoping to use this to sync Anylist with a Google Sheets spreadsheet.

Thanks!

Browser support

Hello i tried using this in a new react 17 project but there is alot of issues with Webpack 5 no longer polyfilling node.js

Example

image

Read Items from List

Hi,
I am trying to convert my Alexa Shopping List to an Array, usable in my Projects.
Is there a snippet showing how to get individual items from a List?
Cheers,
Milan

Get recent items for a list

Hello,

Thank you so much for making this library! With Google removing third-party shopping list support in Google Assistant, I was able to use this library to integrate Anylist with Home Assistant. The only thing missing is automatic categorization of items. I'm not too familiar with the Anylist API but it seems like they are doing that client side? One idea I have for automatically categorizing items is use the recent items list as a lookup table for the category of an item. This way, once I manually assign a category to an item, future insertions of the item will have the same category applied.

Caching credentials and data

As it stands (at least from what I can tell), user credentials are stored on disk and data is stored in memory.

Neither of these things work well in a stateless, multi-user server-side scenario. Would be nice to have a cache implementation.

In my project I used keyv as the direct dependency/interface which allows you to use a variety of backends, including in-memory, file-based, and (of course) distributed caches. It also allows you to use TTLs to manage the data more effectively. If you like the idea, I can make a PR.

Recipe Collections

In working on #32 I noticed that the data response contains Recipe Collection info but the current Recipe implementation does not seem to include it.

Fancy a PR to add this?

Nothing happens...

Running the example from the homepage nothing happens. The app just exits - no error or message or anything.
How come nothing is displayed?

Steps to reproduce:

  1. Init/install
npm init -y
npm i anylist
  1. Copy example from homepage into index.js
  2. Change email/password
  3. node index.js

...nothing.

Node version v19.0.0

503 Service unavailable

Node: 8.5.3
anylist: latest

Started getting error 503 from anylist yesterday in the home assistant addon. Just tried with the index.js and this also give a 503:

$ node index.js 
/home/dev/anylist/node_modules/got/dist/source/as-promise.js:118
                const error = new errors_1.HTTPError(response, options);
                              ^

HTTPError: Response code 503 (Service Unavailable)
    at EventEmitter.<anonymous> (/home/dev/anylist/node_modules/got/dist/source/as-promise.js:118:31)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.