2020-09-19 17:21:38 +02:00
|
|
|
#!/bin/bash
|
2020-11-06 00:27:48 +01:00
|
|
|
if ! silent=yes source "${cfg[namespace]}/webroot/api/session.shs"; then
|
|
|
|
return
|
|
|
|
fi
|
2020-09-19 17:21:38 +02:00
|
|
|
|
2020-11-12 13:06:17 +01:00
|
|
|
data=''
|
2020-09-19 17:21:38 +02:00
|
|
|
|
2020-11-12 13:06:17 +01:00
|
|
|
while [[ "$data" == '' ]]; do
|
|
|
|
data=$(curl -s -H "$(get_auth_string)" "https://api-inmobile-pl.easypack24.net/v1/parcel?updatedAfter=1970-01-01T00:00:00.000Z")
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "$data" | jq -c "[.[] | {shipmentNumber: .shipmentNumber, status: .status, openCode: .openCode, senderName: .senderName, pickupPoint: {name: .pickupPoint.name, status: .pickupPoint.status, location: .pickupPoint.location, description: .pickupPoint.locationDescription, address: .pickupPoint.addressDetails}}]"
|