Crates.io | colissimo_track |
lib.rs | colissimo_track |
version | 0.1.1 |
source | src |
created_at | 2020-06-06 12:06:19.43268 |
updated_at | 2022-09-07 14:21:11.874772 |
description | An unofficial API client for Colissimo, a parcel delivery service |
homepage | |
repository | https://github.com/edgarogh/colissimo_track |
max_upload_size | |
id | 250643 |
size | 11,517 |
This crate allows you to fetch information about the status of a "Colissimo" shipment and its delivery progress (from the receiver's perspective). It uses a reverse-engineered private but not-so-complicated API used by the web page you are supposed to browse as a human.
The crate is very simple, it exports a few structs and an async fn get_tracking_info(shipment_id: &str) -> Result<Shipment, Error>
function to query the shipment API.
https://www.laposte.fr/outils/suivre-vos-envois?code={}
is made with hyper
. The only interesting part we keep is the access-token=[...jwt...]
Set-Cookie header.https://api.laposte.fr/ssu/v1/suivi-unifie/idship/{}?lang=fr_FR
, is made with the cookie. The server should, under normal conditions, respond with a JSON object representing the shipment.serde
magic is used to deserialize this object into a provided data structure (see crate::model::*
).This crate covers the very niche market of Colissimo users, that is, people living in locations where the national public French group "La Poste" operates its parcel delivery services. Since the library allows parcel tracking from the delivery receiver's perspective, the only usages I can find are various client softwares, like mobile apps or home (automation) dashboards.
This is literally my first crate, and my first "finished" Rust project. While I'd love to see this crate being used (although very niche, I admit), make sure to take a look at the code inside before putting yourself and your project at potential risk !
Obviously any feedback, comment, bug report, contribution, or anything else that can help improve this crate &&
/||
my Rust programming level are 100% welcome.
The code inside this repository is licensed under the MIT license.