OPSkins / node-opskins-api

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

TypeError: callback is not a function #8

Closed quo91 closed 6 years ago

quo91 commented 6 years ago

So I'm using your API with the following code:

var OPSkinsAPI = require('@opskins/api'); var opskins = new OPSkinsAPI('a40af66c288875e51feed10a4a0776'); var appid = 753; opskins.getLowestPrices(function(appid, prices) { });

and when I execute it I get this error: TypeError: callback is not a function at C:\Users\Jaka\Desktop\Bot\node_modules\@opskins\api\interfaces\IPricing.js:25:4 at ClientRequest. (C:\Users\Jaka\Desktop\Bot\node_modules\@opskins\api\index.js:123:4) at ClientRequest.g (events.js:292:16) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:474:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23) at TLSSocket.socketOnData (_http_client.js:363:20) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7)

DoctorMcKay commented 6 years ago

Your API key has been revoked since you posted it here.

As per the documentation, you need to supply an appid. For example:

opskins.getLowestPrices(appid, function(err, prices) {
    // code
});