Add owned games thumbnails

This commit is contained in:
Sahat Yalkabov
2014-02-05 23:27:13 -05:00
parent 5aadeed73a
commit 0774772dcd
2 changed files with 11 additions and 8 deletions

View File

@ -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);
}); });
} }
}, },

View File

@ -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")