RIAEvangelist / node-dominos-pizza-api

This is a node.js wrapper for the dominos pizza apis
MIT License
543 stars 129 forks source link

International UK #76

Open NyleCohen opened 6 years ago

NyleCohen commented 6 years ago

Hi!

I want to know how to add in UK support for pizzapi. If anyone could help me that would be amazing.

Thank you. Nyle.

RIAEvangelist commented 3 years ago

v3.x international settings should make this possible now. Still need to work out the endpoints, but everything is baked in to support it.

RIAEvangelist commented 3 years ago

v3 now supports international apis.

Please have a look. If you can not find your API endpoints request help again, and we can work on it together. I will need to work with someone in country to make sure the order completes and you get Pizza.

RIAEvangelist commented 3 years ago

If anyone would like to contribute the API list as defined in docs/InternationalSupport.md

I would be happy to implement it into the code. I do need help from contributors though because I do not know addresses etc to use for testing without traveling to the country on my own.

Help would be greatly appreciated, and the world of Pizza lovers would thank you.

brybalicious commented 2 years ago

@RIAEvangelist Down to help for multiple countries in Europe. Starting with Netherlands. Shall we sync up?

RIAEvangelist commented 2 years ago

@brybalicious Let me know if you have any questions :) I look forward to some PRs on this. Looks like this ticket has been around for 4 years.

brybalicious commented 2 years ago

@RIAEvangelist, I emailed you. I am working on a project that uses this repo and am reasonably motivated. I'm bouncing around internationally and could get e.g. 4 countries live for you within a month or so. I need some help, however. Starting with NL, it's difficult to understand exactly what the endpoints are given that the order flow is different to e.g. the US. I've made an attempt but not managed to order the fabled pepperoni pizza yet. So, if you're up for it, what would work best for me is that we jump on a call to e.g. do one country, then I can attempt the others on my lonesome. Please check your email!

Just replied this particular issue for no particular reason other than that I saw your responses Feb and Mar 2021 saying you'd be open to tag teaming.

RIAEvangelist commented 2 years ago

I'm down to sync. Super busy RN but may have some time to start things in a couple of days if you like.

On Thu, Feb 17, 2022, 4:24 AM brybalicious @.***> wrote:

RIA, I emailed you. I am working on a project that uses this repo and am reasonably motivated. I'm bouncing around internationally and could get e.g. 4 countries live for you within a month or so. I need some help, however. Starting with NL, it's difficult to understand exactly what the endpoints are given that the order flow is different to e.g. the US. I've made an attempt but not managed to order the fabled pepperoni pizza yet. So, if you're up for it, what would work best for me is that we jump on a call to e.g. do one country, then I can attempt the others on my lonesome. Please check your email!

Just replied this particular issue for no particular reason other than that I saw your responses Feb and Mar 2021 saying you'd be open to tag teaming.

— Reply to this email directly, view it on GitHub https://github.com/RIAEvangelist/node-dominos-pizza-api/issues/76#issuecomment-1042895742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC2DEJE3DYA2LF6IGY6SQLU3TSG3ANCNFSM4FPT44GQ . You are receiving this because you were mentioned.Message ID: @.***>

brybalicious commented 2 years ago

Yes. Awesome. Did you get my email? Maybe we could organise a discord call there? @RIAEvangelist

brybalicious commented 2 years ago

In Germany now but only for a few more days. Messaged you at your given public email brandon@diginow.it with subject line "Pizza Around the world" incl. my handle for a potential call.

Thanks

RIAEvangelist commented 2 years ago

I'm going to send you an email.

On Mon, Feb 28, 2022 at 10:40 AM brybalicious @.***> wrote:

In Germany now but only for a few more days. Messaged you at your given public email @.*** with subject line "Pizza Around the world" incl. my handle for a potential call.

Thanks

— Reply to this email directly, view it on GitHub https://github.com/RIAEvangelist/node-dominos-pizza-api/issues/76#issuecomment-1054552232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC2DEOJFVAMWARWHYURP3TU5O6RLANCNFSM4FPT44GQ . You are receiving this because you were mentioned.Message ID: @.***>

ReeceKenney commented 6 months ago

A quick look at fiddler whilst browsing to the Dominos UK website shows some of the following urls:

Locating stores: https://www.dominos.co.uk/api/stores/v1/stores?locationToken=UK-PC:{"postCode":"<POSTCODE-HERE>"}&radius=30&limit=10

Note: The above endpoint specifies a locationToken you see at the end of the url. This seems to work by specifying just a postcode, but when you enter a postcode into their store lookup on their website, it makes a request to the below mentioned url. From there, it seems to take the locationToken from one of the addresses

Look up delivery addresses (where I assume it retrieves the locationToken): https://www.dominos.co.uk/api/location/v1/search?searchText=<POSTCODE-HERE>

Getting basket contents: https://www.dominos.co.uk/api/baskets/v1/baskets

Sorry if this this info is redundant. This code in this repo may already be handling the locationToken lookup logic.

I'd like to help find more urls for the UK when I have time, but maybe this can help point us in the right direction? I haven't proceeded as far as placing an order so the above urls are all I was able to uncover at the moment

RIAEvangelist commented 6 months ago

@ReeceKenney The international file should have a format that you can find by snooping the traffic the way you have been.

https://www.dominos.co.uk/api/location/v1/search?searchText=