13 lines
587 B
Bash
13 lines
587 B
Bash
#!/bin/bash
|
|
if ! silent=yes source "${cfg[namespace]}/webroot/api/session.shs"; then
|
|
return
|
|
fi
|
|
|
|
data=''
|
|
|
|
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}}]"
|