-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass on menu parsing #41
Conversation
Now is the time to make breaking changes. Go for it. If you make the edits, they should show up in this PR still. Then we can pull it all in one request. Looks good! |
Alright, updated all of the occurrences I found. This will break compatibility in other people's code. To get the menu in the original format call Menu.getRaw() |
First pass on menu parsing also, resolves#42
OK, we'll hold onto this code until we confirm coupons working and then release as a major version upgrade. |
@julianh2o does this close #32 ? |
actually we'll push sooner than expected with phone bug and tracking bug fixes |
Nah, it doesn't close it. There is a bunch more functionality I want to get into the Menu before I'll close it. It's stable and a step in the right direction, but I'd like to add more linking and easy API calls and a bunch more examples and tests. PS. my Amazon Echo ordered me a pizza the other day using this API :) |
Dude... SWEET! Do you have the code up? |
It's not up yet, the code is really jenky right now and running as a daemon. I'll be working on it though and I'll let you know when I get it to a place that it's ready to see the light of day. |
cool! |
I've created a few new classes: Menu, MenuItem, and MenuCategory
Store.getMenu now populates the callback's second parameter with a parsed menu as a Menu object. (Note: At some point we should break compatibility and make this return only a Menu object. Users who need the raw object can use Menu.getRaw())
The Menu parsing is currently being showcased in dominos-store-menu.js. I've edited this example to print out the menu in a hierarchical fashion.
I've added a basic smoke test for the menu parsing under menu_test.js
I'll be adding more functionality to this soon, but this seems stable and functional so far.
In this pull request, I've also commented out a line of debugging information in Order.mergeResponse.