delivery-tracker
delivery-tracker copied to clipboard
Feature Request: Return raw response for custom parsing
First of all, thankyou for creating this package. It has helped me tons. I only require Fedex tracking and fedex docs are super confusing, so this has been a lifesaver.
I'd like to request a feature to return raw response for tracking. For eg; Fedex gives tons of data about shipment but the returned data is just an array of 'scans'. It'd be useful if we could set a flag to return all data.
I'll thank about it, but I do not I can guarantee it. If you only need feature in Fedex, how about making by referring to the function below?
var trackingInfo = function (numbers) {
var trackingInfoList = []
if (numbers instanceof Array === false) {
numbers = [numbers]
}
for (var i = 0; i < numbers.length; i++) {
trackingInfoList.push({
trackNumberInfo: {
trackingNumber: numbers[i]
}
})
}
return {
method: 'POST',
url: 'https://www.fedex.com/trackingCal/track',
data: {
data: JSON.stringify({
TrackPackagesRequest: {
trackingInfoList: trackingInfoList
}
}),
action: 'trackpackages'
}
}
}