TypeError: Cannot read property 'GamerCard' of undefined
api.profile({ gamertag : 'Pravdin Linda' }, function(err, user){ if (err) return console.error(err); message.channel.send(user); }); was my code, I am not sure if this is a issue or not...
Just saw this, I'll look at it this weekend.
Alright I forgot to say it had something to do with "var api = new XBoxLive.Source.GamerCard();"
So I was able to look at it this weekend: and I have some bad news: 1 - the docs are wrong and it's .Service rather than .Source... but this might not help you because 2 - it seems the Gamercard endpoints now are 360 specific and linked to your application code (try logging into an xbox 360 after enabling 2 factor auth on your MS account for a crash course on this). So the data you get back may not be exactly what you expect if it is an xbox one user.
Try this:
var XBoxLive = require('./xbox-live');
var api = new XBoxLive.Service.GamerCard();
api.profile({
gamertag : 'khr0me'
}, function(err, data){
console.log('return', arguments);
})
Thank you so much! I will try it out tonight! I will report back when I do!
Alright it worked! Thank you so much! Close the issue when you see this!
Excellent, I'm going to leave this open as a reminder to fix the docs and will close it once complete. Glad it worked for you!
yeah and also using it, it only works with xbox 360 profiles...