Add support for tracking parcels shipped with Cainiao #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been missing the ability to track Cainiao (Aliexpress) parcels on this app which held me off from deleting my other parcel tracking app, so thought I'd have a look at adding it. Turns out it isn't that difficult!
Summary of changes:
I couldn't come up with any tests for this one as it seems that the tracking number can take a few formats based on the local delivery service used when the parcel arrives in the destination country, and I only have a few tracking numbers to test with from my own parcels. It will detect invalid codes in the app just fine by checking it with the API, though.
I gathered together any status codes I could find from my tracking codes and what I could find on the Aliexpress subreddit, I think most of them are covered but there may be a few uncommon ones that I didn't get. Its a bit difficult since there is no documentation for this api.
Main parcels list:

Package in transit:

Delivered package:

Invalid tracking code:

Let me know what you think, happy to make any changes :)