OPSkins / trade-opskins-api

API docs for trade.opskins.com
41 stars 19 forks source link

IItem 3d_viewer Invalid Syntax on NodeJS #94

Closed Marow closed 6 years ago

Marow commented 6 years ago

NodeJS cannot handle with numbers on variables like that.

Please change the 3d_viewer in https://github.com/OPSkins/trade-opskins-api/blob/master/IItem.md to another name without numbers on it.

Otherwise its not that easy to handle like every other variables like video or something. Please change to live_viewer or something and not with a Number.

ha1331 commented 6 years ago

what do you mean? What are the limitations of numbers in variables, in node?

ha1331 commented 6 years ago

This is totally doable in node:

let videoForMarow = standardItemObject.preview_urls["3d_viewer"];
Marow commented 6 years ago

With that i get "null" back... not the 3d_viewer...

Thats what i use for video item.preview_urls.video

that works, but if i change video to 3d_viewer it doesnt work

Okay my fault, looks like not every item has already a link