Skip to content
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

Merged
merged 4 commits into from
Sep 25, 2015
Merged

Conversation

julianh2o
Copy link
Collaborator

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.

@RIAEvangelist
Copy link
Owner

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!

@julianh2o
Copy link
Collaborator Author

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()

julianh2o added a commit that referenced this pull request Sep 25, 2015
First pass on menu parsing also, resolves#42
@julianh2o julianh2o merged commit 877f3a7 into RIAEvangelist:hotfixes Sep 25, 2015
@RIAEvangelist
Copy link
Owner

OK, we'll hold onto this code until we confirm coupons working and then release as a major version upgrade.

@RIAEvangelist
Copy link
Owner

@julianh2o does this close #32 ?

@RIAEvangelist
Copy link
Owner

actually we'll push sooner than expected with phone bug and tracking bug fixes

@julianh2o
Copy link
Collaborator Author

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 :)

@RIAEvangelist
Copy link
Owner

Dude... SWEET! Do you have the code up?

@julianh2o
Copy link
Collaborator Author

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.

@RIAEvangelist
Copy link
Owner

cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants