norkator / paketin-seuranta

Privacy preserving parcel tracking application for Android supporting multiple parcel courier companies. App is targeted in Finnish market. Standalone app, no private backends, tracking or overkill infrastructure. No ads or paid content.
https://play.google.com/store/apps/details?id=com.nitramite.paketinseuranta
MIT License
11 stars 5 forks source link

Fix/posti integration #198

Closed norkator closed 2 years ago

norkator commented 2 years ago

Posti graphql change. Downgrading available details.

ristomatti commented 2 years ago

What a relief to see you still managed to solve this one! :muscle: I took a quick peek at the new API in the hopes of being able to give some hints on how to solve it. I'll need to remember to go through the changes at some point. It looked pretty hairy with with the CSRF token verification etc.

...needless to say that I've got no experience in solving this type of problems.

norkator commented 2 years ago

As @developerfromjokela mentioned at #194

Bearer comes from a request. It's not an actual authentication, posti's API is just stupidly made.

is true and this was pretty straight forward. There is more work to be done because I don't know all available values for provided fields this graphql api gives so please @ristomatti provide me tracking codes some time via Trello if possible. I have soon one package coming with posti and will use it for testing but I think its not enough because we need to check different parcel types and how this api provides info's to make this integration fully use available details.

ristomatti commented 2 years ago

I noticed the comment but somehow failed to spot it while quickly probing. So the initial request will give you the token to use for the next one?

I'll try to remember to send you some codes to test the next time I order something. It's the first time in years I've got zero packages incoming. :grimacing: