From 66bb672de0b1a79d96f93cf5a6f9fc0718031c33 Mon Sep 17 00:00:00 2001 From: MattTimms Date: Sat, 24 Jul 2021 10:38:24 +1000 Subject: [PATCH] docs: updated readme --- README.md | 76 +++++++++++++++++++++++++++-------------------- imgs/headers.jpg | Bin 0 -> 4145 bytes 2 files changed, 43 insertions(+), 33 deletions(-) create mode 100644 imgs/headers.jpg diff --git a/README.md b/README.md index a413d74..0731e3a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # up_woolies -Proof-of-concept combining APIs to provide an itemised breakdown of transactions at Woolworths with Up Banking Account. -The graphic below is a fantasy of how digital receipts could be presented in-app: +Retrieve an itemised breakdown of transactions at Woolworths made with your Up Banking Account. This is a +_proof-of-concept_ & the graphic below is a _fantasy_ of how I imagine digital receipts could be presented in-app:

@@ -9,26 +9,26 @@ The graphic below is a fantasy of how digital receipts could be presented in-app ## motivation -> _"My bank app tells me I spent $38.00 at the grocery store... I wonder what I bought..."_ +> _"My bank app tells me I spent $19.00 at the grocery store... I wonder what I bought..."_ -I predict that banking apps will one-day provide customers with itemised receipts in-app. -It's a big call but when I look into my crystal ball I see; +I predict that banking apps will one day provide customers with itemised receipts in-app. +It's a big call but when I look into my crystal ball I see that; -* Point-of-Sale and payment providers will manage the digital receipts/invoices of the transactions you've made with - your bank card; no need for additional loyalty cards. +* Point-of-Sale and payment providers will host the digital receipts/invoices of the transactions you've made with your + bank card. * Square, Tyro, Stripe, PayPal, etc. will offer secure APIs to pull invoice data as part of the [Consumer Data Rights (CDR)](https://www.cdr.gov.au/what-is-cdr) initiative. -* Banks, financial-wellbeing services, & other FinTechs will bridge invoice data with banking data - thanks to - [Open Banking](https://www.ausbanking.org.au/priorities/open-banking/) & CDR. +* Banks, financial-wellbeing services, & other FinTechs will bridge invoice data with banking data - thanks to CDR & + [Open Banking](https://www.ausbanking.org.au/priorities/open-banking/). The FinTech space is generating a lot of interesting products around the idea of financial-wellness. Up, Douugh, Frollo, WeMoney, and other platforms offer tools to track spending habits - some using "AI" & data-driven tools to help consumers. Surely, these platforms would benefit from having greater granularity to purchases; it is hard to distinguish purchase behaviour from knowing only the vendor & not the items. -I wanted to make a proof-of-concept using Up Bank's well-documented API & one of, if not the largest Australian grocers: -Woolworths. In short, Woolworths API is closed-source & painful to look at. However, they do provide customers with -e-receipts, which is more than I can say for their competitor, Coles' FlyBuy program. +I wanted to make a proof-of-concept using Up Bank's well-documented API & one of, if not the largest Australian grocer: +Woolworths. In short, Woolworths Everyday Rewards API is closed-source & painful to look at. However, they do provide +customers with ✨e-receipts✨, which is more than I can say for their competitor, Coles' FlyBuy program. ## requirements @@ -42,17 +42,24 @@ e-receipts, which is more than I can say for their competitor, Coles' FlyBuy pro 1. Head to [Up Banking's API](https://developer.up.com.au/#welcome) page & grab your personal API token 2. Login to [Woolworth's Everyday Rewards](https://www.woolworthsrewards.com.au/#login) site & navigate around with dev-tools monitoring network traffic. Filter network traffic with `api.woolworthsrewards.com.au` & find any request - that has `client_id` & `authorization` headers. + that has `client_id` & `authorization` headers. +

+ +

+ N.B. the authorization bearer token expires after 30 minutes; you'll need to repeat the process if that occurs. It's pretty frustrating but if you think you can help improve this please [help wanted](#help-wanted) section & reach out. 3. Copy `.env.example` to `.env` & place those three tokens inside: - ``` - WOOLIES_CLIENT_ID=1234abcd... - WOOLIES_TOKEN=1234abcd... - UP_TOKEN=up:yeah:1234abcd... - ``` -4. Look around & run some scripts, you crazy kids! -```commandline + +``` +WOOLIES_CLIENT_ID=cXDN... +WOOLIES_TOKEN=8h41... +UP_TOKEN=up:yeah:1234abcd... +``` + +4. Run `main.py`, look around & have some fun! + +``` $ python main.py {'date': '2020-12-31T10:13:58+11:00', @@ -69,25 +76,28 @@ $ python main.py ## help wanted -I'm holding out for Up Bank to provide API support for 2Up (& multiplayer when that is released). You can help by -reacting to the pending [feature request PR](https://github.com/up-banking/api/issues/84) and, if you're an Upsider, -suggest the feature through support chat in-app πŸ™ - I'd love help with handling Woolworth's authentication process πŸ” I spent quite some time trying to understand how Woolworth's authentication endpoint operates - reading client-side js files, figuring out their device-fingerprint workflow, trying to see if it matches up with some common OAuth practice. Obtaining a user's `client_id` & `bearer token` via `accounts.woolworthsrewards.com.au/er-login/validate-user` from their `email` & `pass` is the ultimate goal. Any help would be great; I'd love to learn how that works. +I'm holding out for Up Bank to provide API support for 2Up (& multiplayer when that is released). You can help by +reacting to the pending [feature request PR](https://github.com/up-banking/api/issues/84) and, if you're an Upsider, +suggest the feature through support chat in-app πŸ™ + ## the graveyard of ideas -* Support OpenBanking API - _aka_ support for all banks! +* 🏧 Support OpenBanking API - _aka_ support for all banks! * I noticed a purchase that I made with Westpac rather than Up, and after looking through Frollo & CDR I realised - that many more banks had begun supporting the Open Banking initiative. - * Unfortunately, despite its affiliation with _"Consumer Data Rights"_, the process of authenticating myself with - these CDR data holders for my _own_ consumer data is a mystery to me. If you know, then please reach out to me. -* Talk to someone about Woolworths' API - * I tried reaching out to Woolworths to talk about their API: EverdayRewards support, the tech subsidiary managing - the program Quantium, even cold-messaged LinkedIn people associate with WooliesX. No luck. -* Support 2Up - * Please read [help wanted](#help-wanted) on how you can help push for API support of 2Up. \ No newline at end of file + that many more banks had begun supporting Open Banking than when I last checked. + * Unfortunately, despite the title _"Consumer Data Rights"_, the process of authenticating myself with these CDR + data holders for my _own_ consumer data is a mystery to me. If you know, then please reach out to me. +* πŸ‘©β€πŸ’Ό Talk to someone about Woolworths' API + * I tried reaching out to Woolworths to talk about their API: EverdayRewards support, Quantium (the tech subsidiary + managing the program), even cold-messaged people on LinkedIn associate with WooliesX. No luck. +* πŸ‘« Support 2Up + * Please read [help wanted](#help-wanted) on how you can help push for API support of 2Up. +* βš– Interpret item weights + * Weight values are currently supporting deli items only; however, most items include there weight in the item + description. It's straight forward to implement - some regex here & there. \ No newline at end of file diff --git a/imgs/headers.jpg b/imgs/headers.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b8174cae8a2bb2f2d915cd6f047f4b7285ea8c19 GIT binary patch literal 4145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