Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Return raw response for custom parsing #3

Open
dpacmittal opened this issue Sep 4, 2018 · 1 comment
Open

Feature Request: Return raw response for custom parsing #3

dpacmittal opened this issue Sep 4, 2018 · 1 comment

Comments

@dpacmittal
Copy link

dpacmittal commented Sep 4, 2018

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.

@egg-
Copy link
Owner

egg- commented Sep 19, 2018

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'
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants