A Java library for tracking Correios' shipments. Heavily inspired by https://github.com/talesluna/rastrojs.
implementation 'java.rastreio:rastreio:1.1.0'
<dependency>
<groupId>java.rastreio</groupId>
<artifactId>rastreio</artifactId>
<version>1.1.0</version>
<type>pom</type>
</dependency>
<dependency org='java.rastreio' name='rastreio' rev='1.1.0'>
<artifact name='rastreio' ext='pom' ></artifact>
</dependency>
Track object async:
Rastreio.track("JT124720455BR", new Rastreio.Listener() {
@Override
public void onSuccess(TrackObject trackObject) {
// Use this tracking object
}
@Override
public void onFailure(Exception e) {
// Report exception
e.printStackTrace();
}
});
Track object sync:
try {
TrackObject trackObject = Rastreio.trackSync("JT124720455BR");
// Use this tracking object
} catch (IOException e) {
// Report exception
e.printStackTrace();
}
Check documentation at https://rubenochiavone.github.io/rastreio-java.
Apache License 2.0. See LICENSE.md.