Add owned games thumbnails
This commit is contained in:
@ -356,13 +356,14 @@ exports.getSteam = function(req, res) {
|
|||||||
query.steamids = steamId;
|
query.steamids = steamId;
|
||||||
var qs = querystring.stringify(query);
|
var qs = querystring.stringify(query);
|
||||||
request.get({ url: 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?' + qs, json: true }, function(error, request, body) {
|
request.get({ url: 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?' + qs, json: true }, function(error, request, body) {
|
||||||
done(error, body);
|
done(error, body.response.players[0]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
ownedGames: function(done) {
|
ownedGames: function(done) {
|
||||||
|
query.include_appinfo = 1;
|
||||||
var qs = querystring.stringify(query);
|
var qs = querystring.stringify(query);
|
||||||
request.get({ url: 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?' + qs, json: true }, function(error, request, body) {
|
request.get({ url: 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?' + qs, json: true }, function(error, request, body) {
|
||||||
done(error, body);
|
done(error, body.response.games);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -12,10 +12,11 @@ block content
|
|||||||
| Overview
|
| Overview
|
||||||
|
|
||||||
h3 Profile Information
|
h3 Profile Information
|
||||||
.lead
|
.lead #{playerSummaries.personaname}
|
||||||
// profile name
|
img(src='#{playerSummaries.avatarmedium}')
|
||||||
// profile avatar
|
.lead Account since #{playerSummaries.timecreated}
|
||||||
// online status
|
.lead Last Online: #{playerSummaries.lastlogoff}
|
||||||
|
.lead Online Status: #{playerSummaries.personastatus}
|
||||||
|
|
||||||
h3 Player achievements for #{playerAchievemments.gameName}
|
h3 Player achievements for #{playerAchievemments.gameName}
|
||||||
p Returns a list of achievements for this user by app id
|
p Returns a list of achievements for this user by app id
|
||||||
@ -25,8 +26,9 @@ block content
|
|||||||
li.text-success= achievement.name
|
li.text-success= achievement.name
|
||||||
|
|
||||||
h3 Owned Games
|
h3 Owned Games
|
||||||
ul.list-unstyled
|
ul.list-unstyled.list-inline
|
||||||
for game in ownedGames
|
for game in ownedGames
|
||||||
li
|
li
|
||||||
img(src='#')
|
a(href='http://store.steampowered.com/app/#{game.appid}/')
|
||||||
|
img(src='http://media.steampowered.com/steamcommunity/public/images/apps/#{game.appid}/#{game.img_logo_url}.jpg' width="92")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user