module Gamertag::Client::Games
Public Instance Methods
Retrieve the number of achievements the user has actually achieved from the collection of games that they have played
@see www.xboxleaders.com/examples/#games @param gamertag [String] User’s gamertag @return [Fixnum] The actual achievement count for the user
# File lib/gamertag/client/games.rb, line 36 def achievement_count(gamertag) get('/games.json', :gamertag => gamertag).data.achievements.current end
Retrieve the games played by the user
@see www.xboxleaders.com/examples/#games @param gamertag [String] User’s gamertag @return [Array<Hashie::Mash>] List of the games played
# File lib/gamertag/client/games.rb, line 9 def games(gamertag) get('/games.json', :gamertag => gamertag).data.games end
Retrieve the number of achievements the user could achieve from the collection of games that they have played at some point
@see www.xboxleaders.com/examples/#games @param gamertag [String] User’s gamertag @return [Fixnum] The potential achievement count for the user
# File lib/gamertag/client/games.rb, line 27 def potential_achievement_count(gamertag) get('/games.json', :gamertag => gamertag).data.achievements.total end
Retrieve the potential gamerscore for the user
@see www.xboxleaders.com/examples/#games @param gamertag [String] User’s gamertag @return [Fixnum] The score the user has achieved
# File lib/gamertag/client/games.rb, line 18 def potential_gamerscore(gamertag) get('/games.json', :gamertag => gamertag).data.gamerscore.total end