Closed moeiscool closed 7 years ago
found the issue LOL biggest noob mistake ever. please close this.
cx({f:'x',ops:{serviceName:'Finding',opType:'GetSellingManagerSaleRecord',params:{ItemID:"172279039480",TransactionID:"1581513952007"}}})
should be
cx({f:'x',op:{serviceName:'Finding',opType:'GetSellingManagerSaleRecord',params:{ItemID:"172279039480",TransactionID:"1581513952007"}}})
op not ops :P LOL my own code
my edited and working code
s={};
s.userOps=function(x,y){
y=function(){return ebay_cred};
for (var n in x) {
y[n]=x[n];
}
return y;
}
var http = require('http'),io = require('socket.io'),fs = require('fs'),request = require('request');
var server = http.createServer();
server.listen(3000);
io = io.listen(server);
io.on('connection', function (cn) {
function tx(x){cn.emit('f',x);}
cn.on('f', function (d) {
switch(d.f){
case'diag':
tx(ebay_cred);
break;
case'getOrders':
d.op.serviceName='Trading',d.op.opType='GetSellingManagerSoldListings';
ebay.xmlRequest(s.userOps(d.op),function(er,e) {
tx({f:'getOrders',d:e});
});
break;
case'x':
// d.op.serviceName='Trading',d.op.opType='GetSellingManagerSaleRecord';
ebay.xmlRequest(s.userOps(d.op),function(er,d) {
tx(d);
});
break;
}
});
});
@moeiscool You can close the ticket with the button at the bottom of the issue page when you're logged in.
I have made a simple script to interface with ebay through this plugin but all queries are using these values.
Even if i leave them blank it queries this same API. Even when i try GetSellingManagerSaleRecord is shows the same response.
What am i doing wrong?
my server.js below.. I have replaced my actual values with XXXXXXXXXXXXXX. The authToken is fed in from the client side at this time.
my client code looks like this
Some example client calls: