ScaleLeap / amazon-mws-api-sdk

A fully typed TypeScript and Node.js Amazon MWS API Unofficial SDK
https://npm.im/@scaleleap/amazon-mws-api-sdk
MIT License
20 stars 12 forks source link

GetFeedSubmissionResult returns XML string #108

Closed justinemmanuelmercado closed 4 years ago

justinemmanuelmercado commented 4 years ago

Re: https://github.com/ScaleLeap/amazon-mws-api-sdk/pull/100#discussion_r445363150

moltar commented 4 years ago

Maybe we can have a method parameter that defines which format to return?

Example:

getFeedSubmissionResult({
  format: 'xml',
})

// or

getFeedSubmissionResult({
  format: 'json',
})

I think this would help users to get the native JS object, and save them from installing a library to convert from XML to JS. As I doubt anyone would be processing XML in JS in any other way than to convert to JSON first.

JSON should probably be the default option too.

What do you think?

justinemmanuelmercado commented 4 years ago

Do you think this can be closed now? I get now why you wanted to open this in the first place. I initially thought you wanted to open this issue to make a mental note that the return for this API is different than the rest

moltar commented 4 years ago

Ya seems like this is done! ✅