OPSkins / node-opskins-api

JavaScript SDK for OPSkins' HTTP API
https://opskins.com
MIT License
27 stars 13 forks source link

/IPricing/GetSuggestedPrices/v2/ results in faulty response #29

Closed ha1331 closed 6 years ago

ha1331 commented 6 years ago

Now this is not really issue of the node-opskins-api package but what ever it is at your end that produces the response. I just decided to report it here because I didn't feel like figuring out where to contact you and just in case someone using this api client runs into issue because of the malformed response. Feel free to close the issue because it's unrelated to the product and deal with it internally if you feel like there is something to fix.

What has happened at some point is that you're returning response that has a mix of strings and numbers as values.

examples:

"P2000 | Bristlecone (Factory New)": {
"op_7_day": 866,
"op_30_day": 866
},
"P2000 | Bristlecone (Field-Tested)": {
"op_7_day": "244",
"op_30_day": "244"
},

and sometimes even inside a single item:

"P250 | Infinity (Field-Tested)": {
"op_7_day": 275,
"op_30_day": "275"
},

Might not seem like a big deal and most likely a lot of people don't even notice this if their language of choise automatically does type casting magics, but I'm 100% certain someone is going to get bit by this sooner or later.

DoctorMcKay commented 6 years ago

This is fixed. Thanks for bringing it to our attention.