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;
var qs = querystring.stringify(query);
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) {
query.include_appinfo = 1;
var qs = querystring.stringify(query);
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
h3 Profile Information
.lead
// profile name
// profile avatar
// online status
.lead #{playerSummaries.personaname}
img(src='#{playerSummaries.avatarmedium}')
.lead Account since #{playerSummaries.timecreated}
.lead Last Online: #{playerSummaries.lastlogoff}
.lead Online Status: #{playerSummaries.personastatus}
h3 Player achievements for #{playerAchievemments.gameName}
p Returns a list of achievements for this user by app id
@ -25,8 +26,9 @@ block content
li.text-success= achievement.name
h3 Owned Games
ul.list-unstyled
ul.list-unstyled.list-inline
for game in ownedGames
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")