TheTimmaeh / node-expresstrade

Interact with the OPSkins ExpressTrade API from Node.js
MIT License
11 stars 4 forks source link

Get inventory dosen't work #1

Closed wedzyou closed 6 years ago

wedzyou commented 6 years ago

Hi i'm trying to get the inventory of my account but nothing concluant show up, i'm using the example project. Here what i get null { status: 1, time: 1530741677, current_page: 1, total_pages: 1, response: { items: [], total: '0', sort_parameters: [ [Object], [Object], [Object], [Object], [Object], [Object] ] } } Thanks for Helping me, Have a nice day

TheTimmaeh commented 6 years ago

Are you sure the API key you're using belongs to the OPSkins account that owns the items?

If so, are the items in your ExpressTrade inventory? The API only covers this inventory, not the OPSkins inventory.

wedzyou commented 6 years ago

Yes all the items are on my wax/expresstrade account, the apikey i'm using is on the same account . I generate this apikey on the opskins website on my account advance option

TheTimmaeh commented 6 years ago

Which app_id are you using? Which game are the items of?

Right now the default app_id is 2 which is CSGO. If you're looking for VGO items, make sure to set {app_id: 1} in your call:

ET.IUser.GetInventory({app_id: 1}, (err, res) => {
  console.log(err, res)
})
Tiger6201 commented 6 years ago

I had the same issue, use it:

ET.IUser.GetInventory({app_id: 1}, (err, res) => { console.log(res.response.items) })