steam-condenser 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +7 -7
- data/README.md +9 -2
- data/doc/A2M_GET_SERVERS_BATCH2_Packet.html +426 -0
- data/doc/A2S_INFO_Packet.html +260 -0
- data/doc/A2S_PLAYER_Packet.html +295 -0
- data/doc/A2S_RULES_Packet.html +296 -0
- data/doc/A2S_SERVERQUERY_GETCHALLENGE_Packet.html +261 -0
- data/doc/AbstractL4DStats.html +978 -0
- data/doc/AbstractL4DWeapon.html +734 -0
- data/doc/Achievement.html +660 -0
- data/doc/AlienSwarmMission.html +1557 -0
- data/doc/AlienSwarmStats.html +965 -0
- data/doc/AlienSwarmWeapon.html +640 -0
- data/doc/AppNews.html +1442 -0
- data/doc/C2M_CHECKMD5_Packet.html +341 -0
- data/doc/CSSMap.html +806 -0
- data/doc/CSSStats.html +825 -0
- data/doc/CSSWeapon.html +889 -0
- data/doc/Cacheable.html +913 -0
- data/doc/Cacheable/ClassMethods.html +696 -0
- data/doc/DefenseGridStats.html +2559 -0
- data/doc/DoDSClass.html +1264 -0
- data/doc/DoDSStats.html +486 -0
- data/doc/DoDSWeapon.html +806 -0
- data/doc/Dota2BetaInventory.html +339 -0
- data/doc/Dota2Inventory.html +339 -0
- data/doc/Dota2Item.html +388 -0
- data/doc/Dota2Stats.html +366 -0
- data/doc/GameAchievement.html +1257 -0
- data/doc/GameClass.html +321 -0
- data/doc/GameInventory.html +1363 -0
- data/doc/GameItem.html +1339 -0
- data/doc/GameLeaderboard.html +1609 -0
- data/doc/GameLeaderboardEntry.html +629 -0
- data/doc/GameSchema.html +568 -0
- data/doc/GameServer.html +2405 -0
- data/doc/GameStats.html +1461 -0
- data/doc/GameWeapon.html +590 -0
- data/doc/GoldSrcServer.html +740 -0
- data/doc/GoldSrcSocket.html +850 -0
- data/doc/ItemSchema.html +780 -0
- data/doc/L4D2Map.html +739 -0
- data/doc/L4D2Stats.html +930 -0
- data/doc/L4D2Weapon.html +486 -0
- data/doc/L4DExplosive.html +374 -0
- data/doc/L4DMap.html +776 -0
- data/doc/L4DStats.html +530 -0
- data/doc/L4DWeapon.html +296 -0
- data/doc/M2A_SERVER_BATCH_Packet.html +430 -0
- data/doc/M2C_ISVALIDMD5_Packet.html +383 -0
- data/doc/M2S_REQUESTRESTART_Packet.html +382 -0
- data/doc/MasterServer.html +1070 -0
- data/doc/MasterServerSocket.html +293 -0
- data/doc/Module.html +194 -0
- data/doc/PacketFormatError.html +257 -0
- data/doc/Portal2Inventory.html +339 -0
- data/doc/Portal2Item.html +499 -0
- data/doc/Portal2Stats.html +368 -0
- data/doc/RCONAuthRequest.html +318 -0
- data/doc/RCONAuthResponse.html +305 -0
- data/doc/RCONBanError.html +247 -0
- data/doc/RCONExecRequest.html +318 -0
- data/doc/RCONExecResponse.html +407 -0
- data/doc/RCONGoldSrcRequest.html +363 -0
- data/doc/RCONGoldSrcResponse.html +367 -0
- data/doc/RCONNoAuthError.html +247 -0
- data/doc/RCONPacket.html +548 -0
- data/doc/RCONPacketFactory.html +300 -0
- data/doc/RCONSocket.html +669 -0
- data/doc/RCONTerminator.html +304 -0
- data/doc/RequestWithChallenge.html +233 -0
- data/doc/S2A_INFO2_Packet.html +371 -0
- data/doc/S2A_INFO_BasePacket.html +357 -0
- data/doc/S2A_INFO_DETAILED_Packet.html +370 -0
- data/doc/S2A_LOGSTRING_Packet.html +373 -0
- data/doc/S2A_PLAYER_Packet.html +417 -0
- data/doc/S2A_RULES_Packet.html +411 -0
- data/doc/S2C_CHALLENGE_Packet.html +370 -0
- data/doc/S2M_HEARTBEAT2_Packet.html +444 -0
- data/doc/Server.html +781 -0
- data/doc/SourceServer.html +776 -0
- data/doc/SourceSocket.html +366 -0
- data/doc/StatsAttribute.html +514 -0
- data/doc/SteamCondenser.html +155 -0
- data/doc/SteamCondenser/A2M_GET_SERVERS_BATCH2_Packet.html +413 -0
- data/doc/SteamCondenser/A2S_INFO_Packet.html +249 -0
- data/doc/SteamCondenser/A2S_PLAYER_Packet.html +281 -0
- data/doc/SteamCondenser/A2S_RULES_Packet.html +282 -0
- data/doc/SteamCondenser/A2S_SERVERQUERY_GETCHALLENGE_Packet.html +250 -0
- data/doc/SteamCondenser/AbstractL4DStats.html +954 -0
- data/doc/SteamCondenser/AbstractL4DWeapon.html +703 -0
- data/doc/SteamCondenser/AlienSwarmMission.html +1494 -0
- data/doc/SteamCondenser/AlienSwarmStats.html +938 -0
- data/doc/SteamCondenser/AlienSwarmWeapon.html +614 -0
- data/doc/SteamCondenser/AppNews.html +1387 -0
- data/doc/SteamCondenser/C2M_CHECKMD5_Packet.html +327 -0
- data/doc/SteamCondenser/CSSMap.html +774 -0
- data/doc/SteamCondenser/CSSStats.html +799 -0
- data/doc/SteamCondenser/CSSWeapon.html +855 -0
- data/doc/SteamCondenser/Cacheable.html +698 -0
- data/doc/SteamCondenser/Cacheable/ClassMethods.html +531 -0
- data/doc/SteamCondenser/Community.html +134 -0
- data/doc/SteamCondenser/DefenseGridStats.html +2455 -0
- data/doc/SteamCondenser/DoDSClass.html +1209 -0
- data/doc/SteamCondenser/DoDSStats.html +470 -0
- data/doc/SteamCondenser/DoDSWeapon.html +774 -0
- data/doc/SteamCondenser/Error.html +156 -0
- data/doc/SteamCondenser/Error/PacketFormat.html +246 -0
- data/doc/SteamCondenser/Error/RCONBan.html +237 -0
- data/doc/SteamCondenser/Error/RCONNoAuth.html +236 -0
- data/doc/SteamCondenser/Error/Timeout.html +238 -0
- data/doc/SteamCondenser/Error/WebApi.html +339 -0
- data/doc/SteamCondenser/GameAchievement.html +1210 -0
- data/doc/SteamCondenser/GameClass.html +306 -0
- data/doc/SteamCondenser/GameInventory.html +1236 -0
- data/doc/SteamCondenser/GameItem.html +1282 -0
- data/doc/SteamCondenser/GameLeaderboard.html +1562 -0
- data/doc/SteamCondenser/GameLeaderboardEntry.html +604 -0
- data/doc/SteamCondenser/GameServer.html +2337 -0
- data/doc/SteamCondenser/GameStats.html +1416 -0
- data/doc/SteamCondenser/GameWeapon.html +566 -0
- data/doc/SteamCondenser/GoldSrcServer.html +716 -0
- data/doc/SteamCondenser/GoldSrcSocket.html +831 -0
- data/doc/SteamCondenser/L4D2Map.html +713 -0
- data/doc/SteamCondenser/L4D2Stats.html +906 -0
- data/doc/SteamCondenser/L4D2Weapon.html +466 -0
- data/doc/SteamCondenser/L4DExplosive.html +362 -0
- data/doc/SteamCondenser/L4DMap.html +746 -0
- data/doc/SteamCondenser/L4DStats.html +513 -0
- data/doc/SteamCondenser/L4DWeapon.html +284 -0
- data/doc/SteamCondenser/M2A_SERVER_BATCH_Packet.html +415 -0
- data/doc/SteamCondenser/M2C_ISVALIDMD5_Packet.html +368 -0
- data/doc/SteamCondenser/M2S_REQUESTRESTART_Packet.html +367 -0
- data/doc/SteamCondenser/MasterServer.html +1046 -0
- data/doc/SteamCondenser/MasterServerSocket.html +282 -0
- data/doc/SteamCondenser/Portal2Inventory.html +217 -0
- data/doc/SteamCondenser/Portal2Item.html +483 -0
- data/doc/SteamCondenser/Portal2Stats.html +353 -0
- data/doc/SteamCondenser/RCONAuthRequest.html +306 -0
- data/doc/SteamCondenser/RCONAuthResponse.html +293 -0
- data/doc/SteamCondenser/RCONExecRequest.html +306 -0
- data/doc/SteamCondenser/RCONExecResponse.html +392 -0
- data/doc/SteamCondenser/RCONGoldSrcRequest.html +349 -0
- data/doc/SteamCondenser/RCONGoldSrcResponse.html +354 -0
- data/doc/SteamCondenser/RCONPacket.html +530 -0
- data/doc/SteamCondenser/RCONPacketFactory.html +293 -0
- data/doc/SteamCondenser/RCONSocket.html +649 -0
- data/doc/SteamCondenser/RCONTerminator.html +292 -0
- data/doc/SteamCondenser/RequestWithChallenge.html +223 -0
- data/doc/SteamCondenser/S2A_INFO2_Packet.html +359 -0
- data/doc/SteamCondenser/S2A_INFO_BasePacket.html +342 -0
- data/doc/SteamCondenser/S2A_INFO_DETAILED_Packet.html +358 -0
- data/doc/SteamCondenser/S2A_LOGSTRING_Packet.html +358 -0
- data/doc/SteamCondenser/S2A_PLAYER_Packet.html +402 -0
- data/doc/SteamCondenser/S2A_RULES_Packet.html +396 -0
- data/doc/SteamCondenser/S2C_CHALLENGE_Packet.html +356 -0
- data/doc/SteamCondenser/S2M_HEARTBEAT2_Packet.html +430 -0
- data/doc/SteamCondenser/Server.html +754 -0
- data/doc/SteamCondenser/Servers.html +133 -0
- data/doc/SteamCondenser/SourceServer.html +752 -0
- data/doc/SteamCondenser/SourceSocket.html +355 -0
- data/doc/SteamCondenser/SteamGame.html +1802 -0
- data/doc/SteamCondenser/SteamGroup.html +969 -0
- data/doc/SteamCondenser/SteamId.html +4242 -0
- data/doc/SteamCondenser/SteamPacket.html +456 -0
- data/doc/SteamCondenser/SteamPacketFactory.html +521 -0
- data/doc/SteamCondenser/SteamPlayer.html +1696 -0
- data/doc/SteamCondenser/SteamSocket.html +679 -0
- data/doc/SteamCondenser/TF2BetaInventory.html +198 -0
- data/doc/SteamCondenser/TF2Class.html +1145 -0
- data/doc/SteamCondenser/TF2ClassFactory.html +263 -0
- data/doc/SteamCondenser/TF2Engineer.html +534 -0
- data/doc/SteamCondenser/TF2GoldenWrench.html +731 -0
- data/doc/SteamCondenser/TF2Inventory.html +217 -0
- data/doc/SteamCondenser/TF2Item.html +482 -0
- data/doc/SteamCondenser/TF2Medic.html +445 -0
- data/doc/SteamCondenser/TF2Sniper.html +357 -0
- data/doc/SteamCondenser/TF2Spy.html +531 -0
- data/doc/SteamCondenser/TF2Stats.html +670 -0
- data/doc/SteamCondenser/TimeoutError.html +249 -0
- data/doc/SteamCondenser/WebApi.html +999 -0
- data/doc/SteamCondenser/XMLData.html +171 -0
- data/doc/SteamCondenserError.html +153 -0
- data/doc/SteamGame.html +1859 -0
- data/doc/SteamGroup.html +1012 -0
- data/doc/SteamId.html +4369 -0
- data/doc/SteamPacket.html +469 -0
- data/doc/SteamPacketFactory.html +545 -0
- data/doc/SteamPlayer.html +1766 -0
- data/doc/SteamSocket.html +699 -0
- data/doc/StringIO.html +947 -0
- data/doc/TF2BetaInventory.html +315 -0
- data/doc/TF2Class.html +1194 -0
- data/doc/TF2ClassFactory.html +273 -0
- data/doc/TF2Engineer.html +558 -0
- data/doc/TF2GoldenWrench.html +760 -0
- data/doc/TF2Inventory.html +339 -0
- data/doc/TF2Item.html +499 -0
- data/doc/TF2Medic.html +465 -0
- data/doc/TF2Sniper.html +373 -0
- data/doc/TF2Spy.html +555 -0
- data/doc/TF2Stats.html +696 -0
- data/doc/WebApi.html +1021 -0
- data/doc/WebApiError.html +347 -0
- data/doc/XMLData.html +253 -0
- data/doc/_index.html +717 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.LICENSE.html +100 -0
- data/doc/file.README.html +136 -0
- data/doc/file_list.html +58 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +136 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +3988 -0
- data/doc/methods_list.html +3900 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/steam-condenser/version.rb +1 -1
- data/lib/steam/community/cacheable.rb +105 -44
- data/lib/steam/community/dota2/dota2_beta_inventory.rb +27 -0
- data/lib/steam/community/dota2/dota2_inventory.rb +27 -0
- data/lib/steam/community/dota2/dota2_item.rb +33 -0
- data/lib/steam/community/game_inventory.rb +18 -16
- data/lib/steam/community/game_leaderboard.rb +2 -2
- data/lib/steam/community/game_stats.rb +1 -1
- data/lib/steam/community/portal2/portal2_inventory.rb +11 -9
- data/lib/steam/community/steam_game.rb +0 -2
- data/lib/steam/community/steam_group.rb +2 -7
- data/lib/steam/community/steam_id.rb +2 -7
- data/lib/steam/community/tf2/tf2_beta_inventory.rb +11 -8
- data/lib/steam/community/tf2/tf2_inventory.rb +11 -9
- data/lib/steam/community/xml_data.rb +8 -1
- data/lib/steam/packets/a2s_player_packet.rb +1 -1
- data/lib/steam/packets/a2s_rules_packet.rb +1 -1
- data/lib/steam/servers/master_server.rb +3 -2
- data/lib/steam/sockets/rcon_socket.rb +1 -2
- data/pkg/steam-condenser-1.2.0.gem +0 -0
- data/pkg/steam-condenser-1.2.0/Gemfile +3 -0
- data/pkg/steam-condenser-1.2.0/Gemfile.lock +30 -0
- data/pkg/steam-condenser-1.2.0/LICENSE +25 -0
- data/pkg/steam-condenser-1.2.0/README.md +47 -0
- data/pkg/steam-condenser-1.2.0/Rakefile +46 -0
- data/pkg/steam-condenser-1.2.0/lib/core_ext/stringio.rb +91 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/packet_format_error.rb +21 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/rcon_ban_error.rb +22 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/rcon_no_auth_error.rb +21 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/steam_condenser_error.rb +11 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/timeout_error.rb +28 -0
- data/pkg/steam-condenser-1.2.0/lib/errors/web_api_error.rb +57 -0
- data/pkg/steam-condenser-1.2.0/lib/steam-condenser.rb +18 -0
- data/pkg/steam-condenser-1.2.0/lib/steam-condenser/community.rb +24 -0
- data/pkg/steam-condenser-1.2.0/lib/steam-condenser/servers.rb +24 -0
- data/pkg/steam-condenser-1.2.0/lib/steam-condenser/version.rb +11 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/alien_swarm/alien_swarm_mission.rb +119 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/alien_swarm/alien_swarm_stats.rb +179 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/alien_swarm/alien_swarm_weapon.rb +49 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/app_news.rb +133 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/cacheable.rb +137 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/css/css_map.rb +61 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/css/css_stats.rb +136 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/css/css_weapon.rb +69 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/defense_grid/defense_grid_stats.rb +237 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/dods/dods_class.rb +90 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/dods/dods_stats.rb +61 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/dods/dods_weapon.rb +67 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_achievement.rb +109 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_class.rb +22 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_inventory.rb +152 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_item.rb +99 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_leaderboard.rb +201 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_leaderboard_entry.rb +43 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_stats.rb +175 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/game_weapon.rb +41 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/abstract_l4d_stats.rb +173 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/abstract_l4d_weapon.rb +56 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d2_map.rb +90 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d2_stats.rb +165 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d2_weapon.rb +38 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d_explosive.rb +34 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d_map.rb +65 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d_stats.rb +71 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/l4d/l4d_weapon.rb +26 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/portal2/portal2_inventory.rb +25 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/portal2/portal2_item.rb +47 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/portal2/portal2_stats.rb +32 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/steam_game.rb +182 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/steam_group.rb +135 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/steam_id.rb +513 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_beta_inventory.rb +22 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_class.rb +92 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_class_factory.rb +40 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_engineer.rb +43 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_golden_wrench.rb +70 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_inventory.rb +25 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_item.rb +47 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_medic.rb +35 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_sniper.rb +28 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_spy.rb +41 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/tf2/tf2_stats.rb +76 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/web_api.rb +129 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/community/xml_data.rb +17 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/a2m_get_servers_batch2_packet.rb +59 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/a2s_info_packet.rb +24 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/a2s_player_packet.rb +31 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/a2s_rules_packet.rb +32 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/a2s_serverquery_getchallenge_packet.rb +25 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/c2m_checkmd5_packet.rb +30 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/m2a_server_batch_packet.rb +52 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/m2c_isvalidmd5_packet.rb +34 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/m2s_requestrestart_packet.rb +34 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_auth_request.rb +28 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_auth_response.rb +30 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_exec_request.rb +28 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_exec_response.rb +37 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_goldsrc_request.rb +35 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_goldsrc_response.rb +34 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_packet.rb +57 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_packet_factory.rb +43 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/rcon/rcon_terminator.rb +29 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/request_with_challenge.rb +19 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_info2_packet.rb +62 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_info_base_packet.rb +35 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_info_detailed_packet.rb +61 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_logstring_packet.rb +30 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_player_packet.rb +44 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2a_rules_packet.rb +48 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2c_challenge_packet.rb +35 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/s2m_heartbeat2_packet.rb +71 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/steam_packet.rb +52 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/packets/steam_packet_factory.rb +108 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/servers/game_server.rb +392 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/servers/goldsrc_server.rb +74 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/servers/master_server.rb +182 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/servers/server.rb +104 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/servers/source_server.rb +98 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/sockets/goldsrc_socket.rb +142 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/sockets/master_server_socket.rb +30 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/sockets/rcon_socket.rb +94 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/sockets/source_socket.rb +78 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/sockets/steam_socket.rb +86 -0
- data/pkg/steam-condenser-1.2.0/lib/steam/steam_player.rb +143 -0
- data/pkg/steam-condenser-1.2.0/steam-condenser.gemspec +25 -0
- data/pkg/steam-condenser-1.2.0/test/core_ext/test_stringio.rb +59 -0
- data/pkg/steam-condenser-1.2.0/test/fixtures/invalid.xml +2 -0
- data/pkg/steam-condenser-1.2.0/test/fixtures/sonofthor.xml +882 -0
- data/pkg/steam-condenser-1.2.0/test/fixtures/status_goldsrc +3 -0
- data/pkg/steam-condenser-1.2.0/test/fixtures/status_source +3 -0
- data/pkg/steam-condenser-1.2.0/test/fixtures/valve-members.xml +231 -0
- data/pkg/steam-condenser-1.2.0/test/helper.rb +45 -0
- data/pkg/steam-condenser-1.2.0/test/steam/communtiy/test_steam_group.rb +83 -0
- data/pkg/steam-condenser-1.2.0/test/steam/communtiy/test_steam_id.rb +111 -0
- data/pkg/steam-condenser-1.2.0/test/steam/communtiy/test_web_api.rb +98 -0
- data/pkg/steam-condenser-1.2.0/test/steam/packets/test_steam_packet.rb +37 -0
- data/pkg/steam-condenser-1.2.0/test/steam/servers/test_game_server.rb +296 -0
- data/pkg/steam-condenser-1.2.0/test/steam/servers/test_goldsrc_server.rb +59 -0
- data/pkg/steam-condenser-1.2.0/test/steam/servers/test_master_server.rb +131 -0
- data/pkg/steam-condenser-1.2.0/test/steam/servers/test_server.rb +72 -0
- data/pkg/steam-condenser-1.2.0/test/steam/servers/test_source_server.rb +126 -0
- data/pkg/steam-condenser-1.2.0/test/steam/sockets/test_goldsrc_socket.rb +127 -0
- data/pkg/steam-condenser-1.2.0/test/steam/sockets/test_master_server_socket.rb +42 -0
- data/pkg/steam-condenser-1.2.0/test/steam/sockets/test_rcon_socket.rb +109 -0
- data/pkg/steam-condenser-1.2.0/test/steam/sockets/test_source_socket.rb +77 -0
- data/pkg/steam-condenser-1.2.0/test/steam/sockets/test_steam_socket.rb +97 -0
- data/steam-condenser.gemspec +3 -3
- data/test/steam/communtiy/test_cacheable.rb +100 -0
- data/test/steam/servers/test_master_server.rb +3 -3
- metadata +366 -15
@@ -0,0 +1,1562 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: SteamCondenser::GameLeaderboard
|
8
|
+
|
9
|
+
— Steam Condenser – Ruby API
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (G)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../SteamCondenser.html" title="SteamCondenser (module)">SteamCondenser</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">GameLeaderboard</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Class: SteamCondenser::GameLeaderboard
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">SteamCondenser::GameLeaderboard</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/steam/community/game_leaderboard.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
<h2>Overview</h2><div class="docstring">
|
96
|
+
<div class="discussion">
|
97
|
+
<p>The GameLeaderboard class represents a single leaderboard for a specific
|
98
|
+
game</p>
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
<div class="tags">
|
104
|
+
|
105
|
+
<h3>Author:</h3>
|
106
|
+
<ul class="author">
|
107
|
+
|
108
|
+
<li>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<div class='inline'><p>Sebastian Staudt</p>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</li>
|
118
|
+
|
119
|
+
</ul>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
<h2>Constant Summary</h2>
|
123
|
+
|
124
|
+
<dl class="constants">
|
125
|
+
|
126
|
+
<dt id="LEADERBOARD_DISPLAY_TYPE_NONE-constant" class="">LEADERBOARD_DISPLAY_TYPE_NONE =
|
127
|
+
|
128
|
+
</dt>
|
129
|
+
<dd><pre class="code"><span class='integer val'>0</span>
|
130
|
+
</pre></dd>
|
131
|
+
|
132
|
+
<dt id="LEADERBOARD_DISPLAY_TYPE_NUMERIC-constant" class="">LEADERBOARD_DISPLAY_TYPE_NUMERIC =
|
133
|
+
|
134
|
+
</dt>
|
135
|
+
<dd><pre class="code"><span class='integer val'>1</span>
|
136
|
+
</pre></dd>
|
137
|
+
|
138
|
+
<dt id="LEADERBOARD_DISPLAY_TYPE_SECONDS-constant" class="">LEADERBOARD_DISPLAY_TYPE_SECONDS =
|
139
|
+
|
140
|
+
</dt>
|
141
|
+
<dd><pre class="code"><span class='integer val'>2</span>
|
142
|
+
</pre></dd>
|
143
|
+
|
144
|
+
<dt id="LEADERBOARD_DISPLAY_TYPE_MILLISECONDS-constant" class="">LEADERBOARD_DISPLAY_TYPE_MILLISECONDS =
|
145
|
+
|
146
|
+
</dt>
|
147
|
+
<dd><pre class="code"><span class='integer val'>3</span>
|
148
|
+
</pre></dd>
|
149
|
+
|
150
|
+
<dt id="LEADERBOARD_SORT_METHOD_NONE-constant" class="">LEADERBOARD_SORT_METHOD_NONE =
|
151
|
+
|
152
|
+
</dt>
|
153
|
+
<dd><pre class="code"><span class='integer val'>0</span>
|
154
|
+
</pre></dd>
|
155
|
+
|
156
|
+
<dt id="LEADERBOARD_SORT_METHOD_ASC-constant" class="">LEADERBOARD_SORT_METHOD_ASC =
|
157
|
+
|
158
|
+
</dt>
|
159
|
+
<dd><pre class="code"><span class='integer val'>1</span>
|
160
|
+
</pre></dd>
|
161
|
+
|
162
|
+
<dt id="LEADERBOARD_SORT_METHOD_DESC-constant" class="">LEADERBOARD_SORT_METHOD_DESC =
|
163
|
+
|
164
|
+
</dt>
|
165
|
+
<dd><pre class="code"><span class='integer val'>2</span>
|
166
|
+
</pre></dd>
|
167
|
+
|
168
|
+
<dt id="leaderboards-classvariable" class="">@@leaderboards =
|
169
|
+
|
170
|
+
</dt>
|
171
|
+
<dd><pre class="code"><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
172
|
+
</pre></dd>
|
173
|
+
|
174
|
+
</dl>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
181
|
+
<ul class="summary">
|
182
|
+
|
183
|
+
<li class="public ">
|
184
|
+
<span class="summary_signature">
|
185
|
+
|
186
|
+
<a href="#display_type-instance_method" title="#display_type (instance method)">- (Fixnum) <strong>display_type</strong> </a>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</span>
|
191
|
+
|
192
|
+
|
193
|
+
<span class="note title readonly">readonly</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'><p>Returns the display type of the scores on this leaderboard.</p>
|
203
|
+
</div></span>
|
204
|
+
|
205
|
+
</li>
|
206
|
+
|
207
|
+
|
208
|
+
<li class="public ">
|
209
|
+
<span class="summary_signature">
|
210
|
+
|
211
|
+
<a href="#entry_count-instance_method" title="#entry_count (instance method)">- (Fixnum) <strong>entry_count</strong> </a>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
</span>
|
216
|
+
|
217
|
+
|
218
|
+
<span class="note title readonly">readonly</span>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'><p>Returns the number of entries on this leaderboard.</p>
|
228
|
+
</div></span>
|
229
|
+
|
230
|
+
</li>
|
231
|
+
|
232
|
+
|
233
|
+
<li class="public ">
|
234
|
+
<span class="summary_signature">
|
235
|
+
|
236
|
+
<a href="#id-instance_method" title="#id (instance method)">- (Fixnum) <strong>id</strong> </a>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</span>
|
241
|
+
|
242
|
+
|
243
|
+
<span class="note title readonly">readonly</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="summary_desc"><div class='inline'><p>Returns the ID of the leaderboard.</p>
|
253
|
+
</div></span>
|
254
|
+
|
255
|
+
</li>
|
256
|
+
|
257
|
+
|
258
|
+
<li class="public ">
|
259
|
+
<span class="summary_signature">
|
260
|
+
|
261
|
+
<a href="#name-instance_method" title="#name (instance method)">- (String) <strong>name</strong> </a>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</span>
|
266
|
+
|
267
|
+
|
268
|
+
<span class="note title readonly">readonly</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'><p>Returns the name of the leaderboard.</p>
|
278
|
+
</div></span>
|
279
|
+
|
280
|
+
</li>
|
281
|
+
|
282
|
+
|
283
|
+
<li class="public ">
|
284
|
+
<span class="summary_signature">
|
285
|
+
|
286
|
+
<a href="#sort_method-instance_method" title="#sort_method (instance method)">- (Fixnum) <strong>sort_method</strong> </a>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</span>
|
291
|
+
|
292
|
+
|
293
|
+
<span class="note title readonly">readonly</span>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
<span class="summary_desc"><div class='inline'><p>Returns the method that is used to sort the entries on the leaderboard.</p>
|
303
|
+
</div></span>
|
304
|
+
|
305
|
+
</li>
|
306
|
+
|
307
|
+
|
308
|
+
</ul>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
<h2>
|
315
|
+
Class Method Summary
|
316
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
317
|
+
</h2>
|
318
|
+
|
319
|
+
<ul class="summary">
|
320
|
+
|
321
|
+
<li class="public ">
|
322
|
+
<span class="summary_signature">
|
323
|
+
|
324
|
+
<a href="#leaderboard-class_method" title="leaderboard (class method)">+ (GameLeaderboard) <strong>leaderboard</strong>(game_name, id) </a>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</span>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
<span class="summary_desc"><div class='inline'><p>Returns the leaderboard for the given game and leaderboard ID or name.</p>
|
338
|
+
</div></span>
|
339
|
+
|
340
|
+
</li>
|
341
|
+
|
342
|
+
|
343
|
+
<li class="public ">
|
344
|
+
<span class="summary_signature">
|
345
|
+
|
346
|
+
<a href="#leaderboards-class_method" title="leaderboards (class method)">+ (Array<GameLeaderboard>) <strong>leaderboards</strong>(game_name) </a>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
</span>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
<span class="summary_desc"><div class='inline'><p>Returns an array containing all of a game's leaderboards.</p>
|
360
|
+
</div></span>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
<li class="private ">
|
366
|
+
<span class="summary_signature">
|
367
|
+
|
368
|
+
<a href="#load_leaderboards-class_method" title="load_leaderboards (class method)">+ (Object) <strong>load_leaderboards</strong>(game_name) </a>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
</span>
|
373
|
+
|
374
|
+
|
375
|
+
<span class="note title private">private</span>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
<span class="summary_desc"><div class='inline'><p>Loads the leaderboards of the specified games into the cache.</p>
|
382
|
+
</div></span>
|
383
|
+
|
384
|
+
</li>
|
385
|
+
|
386
|
+
|
387
|
+
</ul>
|
388
|
+
|
389
|
+
<h2>
|
390
|
+
Instance Method Summary
|
391
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
392
|
+
</h2>
|
393
|
+
|
394
|
+
<ul class="summary">
|
395
|
+
|
396
|
+
<li class="public ">
|
397
|
+
<span class="summary_signature">
|
398
|
+
|
399
|
+
<a href="#entry_for_steam_id-instance_method" title="#entry_for_steam_id (instance method)">- (GameLeaderboardEntry) <strong>entry_for_steam_id</strong>(steam_id) </a>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
</span>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<span class="summary_desc"><div class='inline'><p>Returns the entry on this leaderboard for the user with the given SteamID.</p>
|
413
|
+
</div></span>
|
414
|
+
|
415
|
+
</li>
|
416
|
+
|
417
|
+
|
418
|
+
<li class="public ">
|
419
|
+
<span class="summary_signature">
|
420
|
+
|
421
|
+
<a href="#entry_for_steam_id_friends-instance_method" title="#entry_for_steam_id_friends (instance method)">- (Array<GameLeaderboardEntry>) <strong>entry_for_steam_id_friends</strong>(steam_id) </a>
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
</span>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
<span class="summary_desc"><div class='inline'><p>Returns an array of entries on this leaderboard for the user with the
|
435
|
+
given SteamID and his/her friends.</p>
|
436
|
+
</div></span>
|
437
|
+
|
438
|
+
</li>
|
439
|
+
|
440
|
+
|
441
|
+
<li class="public ">
|
442
|
+
<span class="summary_signature">
|
443
|
+
|
444
|
+
<a href="#entry_range-instance_method" title="#entry_range (instance method)">- (Array<GameLeaderboardEntry>) <strong>entry_range</strong>(first, last) </a>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</span>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
<span class="summary_desc"><div class='inline'><p>Returns the entries on this leaderboard for a given rank range.</p>
|
458
|
+
</div></span>
|
459
|
+
|
460
|
+
</li>
|
461
|
+
|
462
|
+
|
463
|
+
<li class="private ">
|
464
|
+
<span class="summary_signature">
|
465
|
+
|
466
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (GameLeaderboard) <strong>initialize</strong>(board_data) </a>
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</span>
|
471
|
+
|
472
|
+
<span class="note title constructor">constructor</span>
|
473
|
+
|
474
|
+
|
475
|
+
<span class="note title private">private</span>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
<span class="summary_desc"><div class='inline'><p>Creates a new leaderboard instance with the given XML data.</p>
|
482
|
+
</div></span>
|
483
|
+
|
484
|
+
</li>
|
485
|
+
|
486
|
+
|
487
|
+
</ul>
|
488
|
+
|
489
|
+
|
490
|
+
<div id="constructor_details" class="method_details_list">
|
491
|
+
<h2>Constructor Details</h2>
|
492
|
+
|
493
|
+
<div class="method_details first">
|
494
|
+
<p class="signature first" id="initialize-instance_method">
|
495
|
+
|
496
|
+
- (<tt><span class='object_link'><a href="" title="SteamCondenser::GameLeaderboard (class)">GameLeaderboard</a></span></tt>) <strong>initialize</strong>(board_data) <span class="extras">(private)</span>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
</p><div class="docstring">
|
501
|
+
<div class="discussion">
|
502
|
+
<p>Creates a new leaderboard instance with the given XML data</p>
|
503
|
+
|
504
|
+
|
505
|
+
</div>
|
506
|
+
</div>
|
507
|
+
<div class="tags">
|
508
|
+
<h3>Parameters:</h3>
|
509
|
+
<ul class="param">
|
510
|
+
|
511
|
+
<li>
|
512
|
+
|
513
|
+
<span class='name'>board_data</span>
|
514
|
+
|
515
|
+
|
516
|
+
<span class='type'>(<tt>Hash<String, Object></tt>)</span>
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
—
|
521
|
+
<div class='inline'><p>The XML data of the leaderboard</p>
|
522
|
+
</div>
|
523
|
+
|
524
|
+
</li>
|
525
|
+
|
526
|
+
</ul>
|
527
|
+
|
528
|
+
|
529
|
+
</div><table class="source_code">
|
530
|
+
<tr>
|
531
|
+
<td>
|
532
|
+
<pre class="lines">
|
533
|
+
|
534
|
+
|
535
|
+
176
|
536
|
+
177
|
537
|
+
178
|
538
|
+
179
|
539
|
+
180
|
540
|
+
181
|
541
|
+
182
|
542
|
+
183</pre>
|
543
|
+
</td>
|
544
|
+
<td>
|
545
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 176</span>
|
546
|
+
|
547
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_board_data identifier id'>board_data</span><span class='rparen token'>)</span>
|
548
|
+
<span class='rubyid_@url ivar id'>@url</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'url'</span><span class='rbrack token'>]</span>
|
549
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'lbid'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
550
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'name'</span><span class='rbrack token'>]</span>
|
551
|
+
<span class='rubyid_@entry_count ivar id'>@entry_count</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'entries'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
552
|
+
<span class='rubyid_@sort_method ivar id'>@sort_method</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'sortmethod'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
553
|
+
<span class='rubyid_@display_type ivar id'>@display_type</span> <span class='assign token'>=</span> <span class='rubyid_board_data identifier id'>board_data</span><span class='lbrack token'>[</span><span class='string val'>'displaytype'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
554
|
+
<span class='rubyid_end end kw'>end</span>
|
555
|
+
</pre>
|
556
|
+
</td>
|
557
|
+
</tr>
|
558
|
+
</table>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
</div>
|
562
|
+
|
563
|
+
<div id="instance_attr_details" class="attr_details">
|
564
|
+
<h2>Instance Attribute Details</h2>
|
565
|
+
|
566
|
+
|
567
|
+
<span id=""></span>
|
568
|
+
<span id="display_type-instance_method"></span>
|
569
|
+
<div class="method_details first">
|
570
|
+
<p class="signature first" id="display_type-instance_method">
|
571
|
+
|
572
|
+
- (<tt>Fixnum</tt>) <strong>display_type</strong> <span class="extras">(readonly)</span>
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
</p><div class="docstring">
|
577
|
+
<div class="discussion">
|
578
|
+
<p>Returns the display type of the scores on this leaderboard</p>
|
579
|
+
|
580
|
+
|
581
|
+
</div>
|
582
|
+
</div>
|
583
|
+
<div class="tags">
|
584
|
+
|
585
|
+
<h3>Returns:</h3>
|
586
|
+
<ul class="return">
|
587
|
+
|
588
|
+
<li>
|
589
|
+
|
590
|
+
|
591
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
—
|
596
|
+
<div class='inline'><p>The display type of the scores</p>
|
597
|
+
</div>
|
598
|
+
|
599
|
+
</li>
|
600
|
+
|
601
|
+
</ul>
|
602
|
+
|
603
|
+
</div><table class="source_code">
|
604
|
+
<tr>
|
605
|
+
<td>
|
606
|
+
<pre class="lines">
|
607
|
+
|
608
|
+
|
609
|
+
33
|
610
|
+
34
|
611
|
+
35</pre>
|
612
|
+
</td>
|
613
|
+
<td>
|
614
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 33</span>
|
615
|
+
|
616
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_display_type identifier id'>display_type</span>
|
617
|
+
<span class='rubyid_@display_type ivar id'>@display_type</span>
|
618
|
+
<span class='rubyid_end end kw'>end</span>
|
619
|
+
</pre>
|
620
|
+
</td>
|
621
|
+
</tr>
|
622
|
+
</table>
|
623
|
+
</div>
|
624
|
+
|
625
|
+
|
626
|
+
<span id=""></span>
|
627
|
+
<span id="entry_count-instance_method"></span>
|
628
|
+
<div class="method_details ">
|
629
|
+
<p class="signature " id="entry_count-instance_method">
|
630
|
+
|
631
|
+
- (<tt>Fixnum</tt>) <strong>entry_count</strong> <span class="extras">(readonly)</span>
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
</p><div class="docstring">
|
636
|
+
<div class="discussion">
|
637
|
+
<p>Returns the number of entries on this leaderboard</p>
|
638
|
+
|
639
|
+
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
<div class="tags">
|
643
|
+
|
644
|
+
<h3>Returns:</h3>
|
645
|
+
<ul class="return">
|
646
|
+
|
647
|
+
<li>
|
648
|
+
|
649
|
+
|
650
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
—
|
655
|
+
<div class='inline'><p>The number of entries on this leaderboard</p>
|
656
|
+
</div>
|
657
|
+
|
658
|
+
</li>
|
659
|
+
|
660
|
+
</ul>
|
661
|
+
|
662
|
+
</div><table class="source_code">
|
663
|
+
<tr>
|
664
|
+
<td>
|
665
|
+
<pre class="lines">
|
666
|
+
|
667
|
+
|
668
|
+
38
|
669
|
+
39
|
670
|
+
40</pre>
|
671
|
+
</td>
|
672
|
+
<td>
|
673
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 38</span>
|
674
|
+
|
675
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_entry_count identifier id'>entry_count</span>
|
676
|
+
<span class='rubyid_@entry_count ivar id'>@entry_count</span>
|
677
|
+
<span class='rubyid_end end kw'>end</span>
|
678
|
+
</pre>
|
679
|
+
</td>
|
680
|
+
</tr>
|
681
|
+
</table>
|
682
|
+
</div>
|
683
|
+
|
684
|
+
|
685
|
+
<span id=""></span>
|
686
|
+
<span id="id-instance_method"></span>
|
687
|
+
<div class="method_details ">
|
688
|
+
<p class="signature " id="id-instance_method">
|
689
|
+
|
690
|
+
- (<tt>Fixnum</tt>) <strong>id</strong> <span class="extras">(readonly)</span>
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
</p><div class="docstring">
|
695
|
+
<div class="discussion">
|
696
|
+
<p>Returns the ID of the leaderboard</p>
|
697
|
+
|
698
|
+
|
699
|
+
</div>
|
700
|
+
</div>
|
701
|
+
<div class="tags">
|
702
|
+
|
703
|
+
<h3>Returns:</h3>
|
704
|
+
<ul class="return">
|
705
|
+
|
706
|
+
<li>
|
707
|
+
|
708
|
+
|
709
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
—
|
714
|
+
<div class='inline'><p>The ID of the leaderboard</p>
|
715
|
+
</div>
|
716
|
+
|
717
|
+
</li>
|
718
|
+
|
719
|
+
</ul>
|
720
|
+
|
721
|
+
</div><table class="source_code">
|
722
|
+
<tr>
|
723
|
+
<td>
|
724
|
+
<pre class="lines">
|
725
|
+
|
726
|
+
|
727
|
+
43
|
728
|
+
44
|
729
|
+
45</pre>
|
730
|
+
</td>
|
731
|
+
<td>
|
732
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 43</span>
|
733
|
+
|
734
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_id identifier id'>id</span>
|
735
|
+
<span class='rubyid_@id ivar id'>@id</span>
|
736
|
+
<span class='rubyid_end end kw'>end</span>
|
737
|
+
</pre>
|
738
|
+
</td>
|
739
|
+
</tr>
|
740
|
+
</table>
|
741
|
+
</div>
|
742
|
+
|
743
|
+
|
744
|
+
<span id=""></span>
|
745
|
+
<span id="name-instance_method"></span>
|
746
|
+
<div class="method_details ">
|
747
|
+
<p class="signature " id="name-instance_method">
|
748
|
+
|
749
|
+
- (<tt>String</tt>) <strong>name</strong> <span class="extras">(readonly)</span>
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
</p><div class="docstring">
|
754
|
+
<div class="discussion">
|
755
|
+
<p>Returns the name of the leaderboard</p>
|
756
|
+
|
757
|
+
|
758
|
+
</div>
|
759
|
+
</div>
|
760
|
+
<div class="tags">
|
761
|
+
|
762
|
+
<h3>Returns:</h3>
|
763
|
+
<ul class="return">
|
764
|
+
|
765
|
+
<li>
|
766
|
+
|
767
|
+
|
768
|
+
<span class='type'>(<tt>String</tt>)</span>
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
—
|
773
|
+
<div class='inline'><p>The name of the leaderboard</p>
|
774
|
+
</div>
|
775
|
+
|
776
|
+
</li>
|
777
|
+
|
778
|
+
</ul>
|
779
|
+
|
780
|
+
</div><table class="source_code">
|
781
|
+
<tr>
|
782
|
+
<td>
|
783
|
+
<pre class="lines">
|
784
|
+
|
785
|
+
|
786
|
+
48
|
787
|
+
49
|
788
|
+
50</pre>
|
789
|
+
</td>
|
790
|
+
<td>
|
791
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 48</span>
|
792
|
+
|
793
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_name identifier id'>name</span>
|
794
|
+
<span class='rubyid_@name ivar id'>@name</span>
|
795
|
+
<span class='rubyid_end end kw'>end</span>
|
796
|
+
</pre>
|
797
|
+
</td>
|
798
|
+
</tr>
|
799
|
+
</table>
|
800
|
+
</div>
|
801
|
+
|
802
|
+
|
803
|
+
<span id=""></span>
|
804
|
+
<span id="sort_method-instance_method"></span>
|
805
|
+
<div class="method_details ">
|
806
|
+
<p class="signature " id="sort_method-instance_method">
|
807
|
+
|
808
|
+
- (<tt>Fixnum</tt>) <strong>sort_method</strong> <span class="extras">(readonly)</span>
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
</p><div class="docstring">
|
813
|
+
<div class="discussion">
|
814
|
+
<p>Returns the method that is used to sort the entries on the leaderboard</p>
|
815
|
+
|
816
|
+
|
817
|
+
</div>
|
818
|
+
</div>
|
819
|
+
<div class="tags">
|
820
|
+
|
821
|
+
<h3>Returns:</h3>
|
822
|
+
<ul class="return">
|
823
|
+
|
824
|
+
<li>
|
825
|
+
|
826
|
+
|
827
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
—
|
832
|
+
<div class='inline'><p>The sort method</p>
|
833
|
+
</div>
|
834
|
+
|
835
|
+
</li>
|
836
|
+
|
837
|
+
</ul>
|
838
|
+
|
839
|
+
</div><table class="source_code">
|
840
|
+
<tr>
|
841
|
+
<td>
|
842
|
+
<pre class="lines">
|
843
|
+
|
844
|
+
|
845
|
+
53
|
846
|
+
54
|
847
|
+
55</pre>
|
848
|
+
</td>
|
849
|
+
<td>
|
850
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 53</span>
|
851
|
+
|
852
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sort_method identifier id'>sort_method</span>
|
853
|
+
<span class='rubyid_@sort_method ivar id'>@sort_method</span>
|
854
|
+
<span class='rubyid_end end kw'>end</span>
|
855
|
+
</pre>
|
856
|
+
</td>
|
857
|
+
</tr>
|
858
|
+
</table>
|
859
|
+
</div>
|
860
|
+
|
861
|
+
</div>
|
862
|
+
|
863
|
+
|
864
|
+
<div id="class_method_details" class="method_details_list">
|
865
|
+
<h2>Class Method Details</h2>
|
866
|
+
|
867
|
+
|
868
|
+
<div class="method_details first">
|
869
|
+
<p class="signature first" id="leaderboard-class_method">
|
870
|
+
|
871
|
+
+ (<tt><span class='object_link'><a href="" title="SteamCondenser::GameLeaderboard (class)">GameLeaderboard</a></span></tt>) <strong>leaderboard</strong>(game_name, id)
|
872
|
+
|
873
|
+
|
874
|
+
|
875
|
+
</p><div class="docstring">
|
876
|
+
<div class="discussion">
|
877
|
+
<p>Returns the leaderboard for the given game and leaderboard ID or name</p>
|
878
|
+
|
879
|
+
|
880
|
+
</div>
|
881
|
+
</div>
|
882
|
+
<div class="tags">
|
883
|
+
<h3>Parameters:</h3>
|
884
|
+
<ul class="param">
|
885
|
+
|
886
|
+
<li>
|
887
|
+
|
888
|
+
<span class='name'>game_name</span>
|
889
|
+
|
890
|
+
|
891
|
+
<span class='type'>(<tt>String</tt>)</span>
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
—
|
896
|
+
<div class='inline'><p>The short name of the game</p>
|
897
|
+
</div>
|
898
|
+
|
899
|
+
</li>
|
900
|
+
|
901
|
+
<li>
|
902
|
+
|
903
|
+
<span class='name'>id</span>
|
904
|
+
|
905
|
+
|
906
|
+
<span class='type'>(<tt>Fixnum</tt>, <tt>String</tt>)</span>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
—
|
911
|
+
<div class='inline'><p>The ID or name of the leaderboard to return</p>
|
912
|
+
</div>
|
913
|
+
|
914
|
+
</li>
|
915
|
+
|
916
|
+
</ul>
|
917
|
+
|
918
|
+
<h3>Returns:</h3>
|
919
|
+
<ul class="return">
|
920
|
+
|
921
|
+
<li>
|
922
|
+
|
923
|
+
|
924
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="SteamCondenser::GameLeaderboard (class)">GameLeaderboard</a></span></tt>)</span>
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
—
|
929
|
+
<div class='inline'><p>The matching leaderboard if available</p>
|
930
|
+
</div>
|
931
|
+
|
932
|
+
</li>
|
933
|
+
|
934
|
+
</ul>
|
935
|
+
|
936
|
+
</div><table class="source_code">
|
937
|
+
<tr>
|
938
|
+
<td>
|
939
|
+
<pre class="lines">
|
940
|
+
|
941
|
+
|
942
|
+
60
|
943
|
+
61
|
944
|
+
62
|
945
|
+
63
|
946
|
+
64
|
947
|
+
65
|
948
|
+
66
|
949
|
+
67
|
950
|
+
68
|
951
|
+
69
|
952
|
+
70</pre>
|
953
|
+
</td>
|
954
|
+
<td>
|
955
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 60</span>
|
956
|
+
|
957
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_leaderboard identifier id'>leaderboard</span><span class='lparen token'>(</span><span class='rubyid_game_name identifier id'>game_name</span><span class='comma token'>,</span> <span class='rubyid_id identifier id'>id</span><span class='rparen token'>)</span>
|
958
|
+
<span class='rubyid_leaderboards identifier id'>leaderboards</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_leaderboards identifier id'>leaderboards</span> <span class='rubyid_game_name identifier id'>game_name</span>
|
959
|
+
|
960
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_id identifier id'>id</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Fixnum constant id'>Fixnum</span>
|
961
|
+
<span class='rubyid_leaderboards identifier id'>leaderboards</span><span class='lbrack token'>[</span><span class='rubyid_id identifier id'>id</span><span class='rbrack token'>]</span>
|
962
|
+
<span class='rubyid_else else kw'>else</span>
|
963
|
+
<span class='rubyid_leaderboards identifier id'>leaderboards</span><span class='dot token'>.</span><span class='rubyid_each_value identifier id'>each_value</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_board identifier id'>board</span><span class='bitor op'>|</span>
|
964
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_board identifier id'>board</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_board identifier id'>board</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span> <span class='eq op'>==</span> <span class='rubyid_id identifier id'>id</span>
|
965
|
+
<span class='rubyid_end end kw'>end</span>
|
966
|
+
<span class='rubyid_end end kw'>end</span>
|
967
|
+
<span class='rubyid_end end kw'>end</span>
|
968
|
+
</pre>
|
969
|
+
</td>
|
970
|
+
</tr>
|
971
|
+
</table>
|
972
|
+
</div>
|
973
|
+
|
974
|
+
<div class="method_details ">
|
975
|
+
<p class="signature " id="leaderboards-class_method">
|
976
|
+
|
977
|
+
+ (<tt>Array<<span class='object_link'><a href="" title="SteamCondenser::GameLeaderboard (class)">GameLeaderboard</a></span>></tt>) <strong>leaderboards</strong>(game_name)
|
978
|
+
|
979
|
+
|
980
|
+
|
981
|
+
</p><div class="docstring">
|
982
|
+
<div class="discussion">
|
983
|
+
<p>Returns an array containing all of a game's leaderboards</p>
|
984
|
+
|
985
|
+
|
986
|
+
</div>
|
987
|
+
</div>
|
988
|
+
<div class="tags">
|
989
|
+
<h3>Parameters:</h3>
|
990
|
+
<ul class="param">
|
991
|
+
|
992
|
+
<li>
|
993
|
+
|
994
|
+
<span class='name'>game_name</span>
|
995
|
+
|
996
|
+
|
997
|
+
<span class='type'>(<tt>String</tt>)</span>
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
—
|
1002
|
+
<div class='inline'><p>The name of the game</p>
|
1003
|
+
</div>
|
1004
|
+
|
1005
|
+
</li>
|
1006
|
+
|
1007
|
+
</ul>
|
1008
|
+
|
1009
|
+
<h3>Returns:</h3>
|
1010
|
+
<ul class="return">
|
1011
|
+
|
1012
|
+
<li>
|
1013
|
+
|
1014
|
+
|
1015
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="" title="SteamCondenser::GameLeaderboard (class)">GameLeaderboard</a></span>></tt>)</span>
|
1016
|
+
|
1017
|
+
|
1018
|
+
|
1019
|
+
—
|
1020
|
+
<div class='inline'><p>The leaderboards for this game</p>
|
1021
|
+
</div>
|
1022
|
+
|
1023
|
+
</li>
|
1024
|
+
|
1025
|
+
</ul>
|
1026
|
+
|
1027
|
+
</div><table class="source_code">
|
1028
|
+
<tr>
|
1029
|
+
<td>
|
1030
|
+
<pre class="lines">
|
1031
|
+
|
1032
|
+
|
1033
|
+
76
|
1034
|
+
77
|
1035
|
+
78
|
1036
|
+
79
|
1037
|
+
80</pre>
|
1038
|
+
</td>
|
1039
|
+
<td>
|
1040
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 76</span>
|
1041
|
+
|
1042
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_leaderboards identifier id'>leaderboards</span><span class='lparen token'>(</span><span class='rubyid_game_name identifier id'>game_name</span><span class='rparen token'>)</span>
|
1043
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_load_leaderboards identifier id'>load_leaderboards</span> <span class='rubyid_game_name identifier id'>game_name</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_@@leaderboards ivar id'>@@leaderboards</span><span class='dot token'>.</span><span class='rubyid_key? fid id'>key?</span> <span class='rubyid_game_name identifier id'>game_name</span>
|
1044
|
+
|
1045
|
+
<span class='rubyid_@@leaderboards ivar id'>@@leaderboards</span><span class='lbrack token'>[</span><span class='rubyid_game_name identifier id'>game_name</span><span class='rbrack token'>]</span>
|
1046
|
+
<span class='rubyid_end end kw'>end</span>
|
1047
|
+
</pre>
|
1048
|
+
</td>
|
1049
|
+
</tr>
|
1050
|
+
</table>
|
1051
|
+
</div>
|
1052
|
+
|
1053
|
+
<div class="method_details ">
|
1054
|
+
<p class="signature " id="load_leaderboards-class_method">
|
1055
|
+
|
1056
|
+
+ (<tt>Object</tt>) <strong>load_leaderboards</strong>(game_name) <span class="extras">(private)</span>
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
</p><div class="docstring">
|
1061
|
+
<div class="discussion">
|
1062
|
+
<p>Loads the leaderboards of the specified games into the cache</p>
|
1063
|
+
|
1064
|
+
|
1065
|
+
</div>
|
1066
|
+
</div>
|
1067
|
+
<div class="tags">
|
1068
|
+
<h3>Parameters:</h3>
|
1069
|
+
<ul class="param">
|
1070
|
+
|
1071
|
+
<li>
|
1072
|
+
|
1073
|
+
<span class='name'>game_name</span>
|
1074
|
+
|
1075
|
+
|
1076
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
—
|
1081
|
+
<div class='inline'><p>The short name of the game</p>
|
1082
|
+
</div>
|
1083
|
+
|
1084
|
+
</li>
|
1085
|
+
|
1086
|
+
</ul>
|
1087
|
+
|
1088
|
+
<h3>Raises:</h3>
|
1089
|
+
<ul class="raise">
|
1090
|
+
|
1091
|
+
<li>
|
1092
|
+
|
1093
|
+
|
1094
|
+
<span class='type'>(<tt>SteamCondenserException</tt>)</span>
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
—
|
1099
|
+
<div class='inline'><p>if an error occurs while fetching the
|
1100
|
+
leaderboards</p>
|
1101
|
+
</div>
|
1102
|
+
|
1103
|
+
</li>
|
1104
|
+
|
1105
|
+
</ul>
|
1106
|
+
|
1107
|
+
</div><table class="source_code">
|
1108
|
+
<tr>
|
1109
|
+
<td>
|
1110
|
+
<pre class="lines">
|
1111
|
+
|
1112
|
+
|
1113
|
+
190
|
1114
|
+
191
|
1115
|
+
192
|
1116
|
+
193
|
1117
|
+
194
|
1118
|
+
195
|
1119
|
+
196
|
1120
|
+
197
|
1121
|
+
198
|
1122
|
+
199
|
1123
|
+
200
|
1124
|
+
201
|
1125
|
+
202</pre>
|
1126
|
+
</td>
|
1127
|
+
<td>
|
1128
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 190</span>
|
1129
|
+
|
1130
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_load_leaderboards identifier id'>load_leaderboards</span><span class='lparen token'>(</span><span class='rubyid_game_name identifier id'>game_name</span><span class='rparen token'>)</span>
|
1131
|
+
<span class='rubyid_url identifier id'>url</span> <span class='assign token'>=</span> <span class='dstring node'>"http://steamcommunity.com/stats/#{game_name}/leaderboards/?xml=1"</span>
|
1132
|
+
<span class='rubyid_boards_data identifier id'>boards_data</span> <span class='assign token'>=</span> <span class='rubyid_MultiXml constant id'>MultiXml</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_url identifier id'>url</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='symbol val'>:proxy</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_values identifier id'>values</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
|
1133
|
+
|
1134
|
+
<span class='rubyid_error identifier id'>error</span> <span class='assign token'>=</span> <span class='rubyid_boards_data identifier id'>boards_data</span><span class='lbrack token'>[</span><span class='string val'>'error'</span><span class='rbrack token'>]</span>
|
1135
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span> <span class='rubyid_error identifier id'>error</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_error identifier id'>error</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
1136
|
+
|
1137
|
+
<span class='rubyid_@@leaderboards ivar id'>@@leaderboards</span><span class='lbrack token'>[</span><span class='rubyid_game_name identifier id'>game_name</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
1138
|
+
<span class='rubyid_boards_data identifier id'>boards_data</span><span class='lbrack token'>[</span><span class='string val'>'leaderboard'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_board_data identifier id'>board_data</span><span class='bitor op'>|</span>
|
1139
|
+
<span class='rubyid_leaderboard identifier id'>leaderboard</span> <span class='assign token'>=</span> <span class='rubyid_GameLeaderboard constant id'>GameLeaderboard</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_board_data identifier id'>board_data</span>
|
1140
|
+
<span class='rubyid_@@leaderboards ivar id'>@@leaderboards</span><span class='lbrack token'>[</span><span class='rubyid_game_name identifier id'>game_name</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='rubyid_leaderboard identifier id'>leaderboard</span><span class='dot token'>.</span><span class='rubyid_id identifier id'>id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_leaderboard identifier id'>leaderboard</span>
|
1141
|
+
<span class='rubyid_end end kw'>end</span>
|
1142
|
+
<span class='rubyid_end end kw'>end</span>
|
1143
|
+
</pre>
|
1144
|
+
</td>
|
1145
|
+
</tr>
|
1146
|
+
</table>
|
1147
|
+
</div>
|
1148
|
+
|
1149
|
+
</div>
|
1150
|
+
|
1151
|
+
<div id="instance_method_details" class="method_details_list">
|
1152
|
+
<h2>Instance Method Details</h2>
|
1153
|
+
|
1154
|
+
|
1155
|
+
<div class="method_details first">
|
1156
|
+
<p class="signature first" id="entry_for_steam_id-instance_method">
|
1157
|
+
|
1158
|
+
- (<tt><span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span></tt>) <strong>entry_for_steam_id</strong>(steam_id)
|
1159
|
+
|
1160
|
+
|
1161
|
+
|
1162
|
+
</p><div class="docstring">
|
1163
|
+
<div class="discussion">
|
1164
|
+
<p>Returns the entry on this leaderboard for the user with the given SteamID</p>
|
1165
|
+
|
1166
|
+
<p>raise [SteamCondenserException] if an error occurs while fetching the
|
1167
|
+
leaderboard</p>
|
1168
|
+
|
1169
|
+
|
1170
|
+
</div>
|
1171
|
+
</div>
|
1172
|
+
<div class="tags">
|
1173
|
+
<h3>Parameters:</h3>
|
1174
|
+
<ul class="param">
|
1175
|
+
|
1176
|
+
<li>
|
1177
|
+
|
1178
|
+
<span class='name'>steam_id</span>
|
1179
|
+
|
1180
|
+
|
1181
|
+
<span class='type'>(<tt>Fixnum</tt>, <tt><span class='object_link'><a href="SteamId.html" title="SteamCondenser::SteamId (class)">SteamId</a></span></tt>)</span>
|
1182
|
+
|
1183
|
+
|
1184
|
+
|
1185
|
+
—
|
1186
|
+
<div class='inline'><p>The 64bit SteamID or the <code>SteamId</code>
|
1187
|
+
object of the user</p>
|
1188
|
+
</div>
|
1189
|
+
|
1190
|
+
</li>
|
1191
|
+
|
1192
|
+
</ul>
|
1193
|
+
|
1194
|
+
<h3>Returns:</h3>
|
1195
|
+
<ul class="return">
|
1196
|
+
|
1197
|
+
<li>
|
1198
|
+
|
1199
|
+
|
1200
|
+
<span class='type'>(<tt><span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span></tt>)</span>
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
—
|
1205
|
+
<div class='inline'><p>The entry of the user if available</p>
|
1206
|
+
</div>
|
1207
|
+
|
1208
|
+
</li>
|
1209
|
+
|
1210
|
+
</ul>
|
1211
|
+
<h3>Raises:</h3>
|
1212
|
+
<ul class="raise">
|
1213
|
+
|
1214
|
+
<li>
|
1215
|
+
|
1216
|
+
|
1217
|
+
<span class='type'>(<tt><span class='object_link'><a href="Error.html" title="SteamCondenser::Error (class)">Error</a></span></tt>)</span>
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
</li>
|
1222
|
+
|
1223
|
+
</ul>
|
1224
|
+
|
1225
|
+
</div><table class="source_code">
|
1226
|
+
<tr>
|
1227
|
+
<td>
|
1228
|
+
<pre class="lines">
|
1229
|
+
|
1230
|
+
|
1231
|
+
89
|
1232
|
+
90
|
1233
|
+
91
|
1234
|
+
92
|
1235
|
+
93
|
1236
|
+
94
|
1237
|
+
95
|
1238
|
+
96
|
1239
|
+
97
|
1240
|
+
98
|
1241
|
+
99
|
1242
|
+
100
|
1243
|
+
101
|
1244
|
+
102
|
1245
|
+
103
|
1246
|
+
104
|
1247
|
+
105</pre>
|
1248
|
+
</td>
|
1249
|
+
<td>
|
1250
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 89</span>
|
1251
|
+
|
1252
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_entry_for_steam_id identifier id'>entry_for_steam_id</span><span class='lparen token'>(</span><span class='rubyid_steam_id identifier id'>steam_id</span><span class='rparen token'>)</span>
|
1253
|
+
<span class='rubyid_steam_id identifier id'>steam_id</span> <span class='assign token'>=</span> <span class='rubyid_steam_id identifier id'>steam_id</span><span class='dot token'>.</span><span class='rubyid_steam_id64 identifier id'>steam_id64</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_steam_id identifier id'>steam_id</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_SteamId constant id'>SteamId</span>
|
1254
|
+
|
1255
|
+
<span class='rubyid_url identifier id'>url</span> <span class='assign token'>=</span> <span class='dstring node'>"#@url&steamid=#{steam_id}"</span>
|
1256
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span> <span class='assign token'>=</span> <span class='rubyid_MultiXml constant id'>MultiXml</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_url identifier id'>url</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='symbol val'>:proxy</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_values identifier id'>values</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
|
1257
|
+
|
1258
|
+
<span class='rubyid_error identifier id'>error</span> <span class='assign token'>=</span> <span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'error'</span><span class='rbrack token'>]</span>
|
1259
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span> <span class='rubyid_error identifier id'>error</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_error identifier id'>error</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
1260
|
+
|
1261
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'entries'</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='string val'>'entry'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_entry_data identifier id'>entry_data</span><span class='bitor op'>|</span>
|
1262
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='lbrack token'>[</span><span class='string val'>'steamid'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='eq op'>==</span> <span class='rubyid_steam_id identifier id'>steam_id</span>
|
1263
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_GameLeaderboardEntry constant id'>GameLeaderboardEntry</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span>
|
1264
|
+
<span class='rubyid_end end kw'>end</span>
|
1265
|
+
<span class='rubyid_end end kw'>end</span>
|
1266
|
+
|
1267
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
1268
|
+
<span class='rubyid_end end kw'>end</span>
|
1269
|
+
</pre>
|
1270
|
+
</td>
|
1271
|
+
</tr>
|
1272
|
+
</table>
|
1273
|
+
</div>
|
1274
|
+
|
1275
|
+
<div class="method_details ">
|
1276
|
+
<p class="signature " id="entry_for_steam_id_friends-instance_method">
|
1277
|
+
|
1278
|
+
- (<tt>Array<<span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span>></tt>) <strong>entry_for_steam_id_friends</strong>(steam_id)
|
1279
|
+
|
1280
|
+
|
1281
|
+
|
1282
|
+
</p><div class="docstring">
|
1283
|
+
<div class="discussion">
|
1284
|
+
<p>Returns an array of entries on this leaderboard for the user with the
|
1285
|
+
given SteamID and his/her friends</p>
|
1286
|
+
|
1287
|
+
<p>raise [SteamCondenserException] if an error occurs while fetching the
|
1288
|
+
leaderboard</p>
|
1289
|
+
|
1290
|
+
|
1291
|
+
</div>
|
1292
|
+
</div>
|
1293
|
+
<div class="tags">
|
1294
|
+
<h3>Parameters:</h3>
|
1295
|
+
<ul class="param">
|
1296
|
+
|
1297
|
+
<li>
|
1298
|
+
|
1299
|
+
<span class='name'>steam_id</span>
|
1300
|
+
|
1301
|
+
|
1302
|
+
<span class='type'>(<tt>Fixnum</tt>, <tt><span class='object_link'><a href="SteamId.html" title="SteamCondenser::SteamId (class)">SteamId</a></span></tt>)</span>
|
1303
|
+
|
1304
|
+
|
1305
|
+
|
1306
|
+
—
|
1307
|
+
<div class='inline'><p>The 64bit SteamID or the <code>SteamId</code>
|
1308
|
+
object of the user</p>
|
1309
|
+
</div>
|
1310
|
+
|
1311
|
+
</li>
|
1312
|
+
|
1313
|
+
</ul>
|
1314
|
+
|
1315
|
+
<h3>Returns:</h3>
|
1316
|
+
<ul class="return">
|
1317
|
+
|
1318
|
+
<li>
|
1319
|
+
|
1320
|
+
|
1321
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span>></tt>)</span>
|
1322
|
+
|
1323
|
+
|
1324
|
+
|
1325
|
+
—
|
1326
|
+
<div class='inline'><p>The entries of the user and his/her
|
1327
|
+
friends</p>
|
1328
|
+
</div>
|
1329
|
+
|
1330
|
+
</li>
|
1331
|
+
|
1332
|
+
</ul>
|
1333
|
+
<h3>Raises:</h3>
|
1334
|
+
<ul class="raise">
|
1335
|
+
|
1336
|
+
<li>
|
1337
|
+
|
1338
|
+
|
1339
|
+
<span class='type'>(<tt><span class='object_link'><a href="Error.html" title="SteamCondenser::Error (class)">Error</a></span></tt>)</span>
|
1340
|
+
|
1341
|
+
|
1342
|
+
|
1343
|
+
</li>
|
1344
|
+
|
1345
|
+
</ul>
|
1346
|
+
|
1347
|
+
</div><table class="source_code">
|
1348
|
+
<tr>
|
1349
|
+
<td>
|
1350
|
+
<pre class="lines">
|
1351
|
+
|
1352
|
+
|
1353
|
+
116
|
1354
|
+
117
|
1355
|
+
118
|
1356
|
+
119
|
1357
|
+
120
|
1358
|
+
121
|
1359
|
+
122
|
1360
|
+
123
|
1361
|
+
124
|
1362
|
+
125
|
1363
|
+
126
|
1364
|
+
127
|
1365
|
+
128
|
1366
|
+
129
|
1367
|
+
130
|
1368
|
+
131
|
1369
|
+
132</pre>
|
1370
|
+
</td>
|
1371
|
+
<td>
|
1372
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 116</span>
|
1373
|
+
|
1374
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_entry_for_steam_id_friends identifier id'>entry_for_steam_id_friends</span><span class='lparen token'>(</span><span class='rubyid_steam_id identifier id'>steam_id</span><span class='rparen token'>)</span>
|
1375
|
+
<span class='rubyid_steam_id identifier id'>steam_id</span> <span class='assign token'>=</span> <span class='rubyid_steam_id identifier id'>steam_id</span><span class='dot token'>.</span><span class='rubyid_steam_id64 identifier id'>steam_id64</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_steam_id identifier id'>steam_id</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_SteamId constant id'>SteamId</span>
|
1376
|
+
|
1377
|
+
<span class='rubyid_url identifier id'>url</span> <span class='assign token'>=</span> <span class='dstring node'>"#@url&steamid=#{steam_id}"</span>
|
1378
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span> <span class='assign token'>=</span> <span class='rubyid_MultiXml constant id'>MultiXml</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_url identifier id'>url</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='symbol val'>:proxy</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_values identifier id'>values</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
|
1379
|
+
|
1380
|
+
<span class='rubyid_error identifier id'>error</span> <span class='assign token'>=</span> <span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'error'</span><span class='rbrack token'>]</span>
|
1381
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span> <span class='rubyid_error identifier id'>error</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_error identifier id'>error</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
1382
|
+
|
1383
|
+
<span class='rubyid_entries identifier id'>entries</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
1384
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'entries'</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='string val'>'entry'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_entry_data identifier id'>entry_data</span><span class='bitor op'>|</span>
|
1385
|
+
<span class='rubyid_rank identifier id'>rank</span> <span class='assign token'>=</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='lbrack token'>[</span><span class='string val'>'rank'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
1386
|
+
<span class='rubyid_entries identifier id'>entries</span><span class='lbrack token'>[</span><span class='rubyid_rank identifier id'>rank</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_GameLeaderboardEntry constant id'>GameLeaderboardEntry</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span>
|
1387
|
+
<span class='rubyid_end end kw'>end</span>
|
1388
|
+
|
1389
|
+
<span class='rubyid_entries identifier id'>entries</span>
|
1390
|
+
<span class='rubyid_end end kw'>end</span>
|
1391
|
+
</pre>
|
1392
|
+
</td>
|
1393
|
+
</tr>
|
1394
|
+
</table>
|
1395
|
+
</div>
|
1396
|
+
|
1397
|
+
<div class="method_details ">
|
1398
|
+
<p class="signature " id="entry_range-instance_method">
|
1399
|
+
|
1400
|
+
- (<tt>Array<<span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span>></tt>) <strong>entry_range</strong>(first, last)
|
1401
|
+
|
1402
|
+
|
1403
|
+
|
1404
|
+
</p><div class="docstring">
|
1405
|
+
<div class="discussion">
|
1406
|
+
<p>Returns the entries on this leaderboard for a given rank range</p>
|
1407
|
+
|
1408
|
+
<p>The range is inclusive and a maximum of 5001 entries can be returned in a
|
1409
|
+
single request.</p>
|
1410
|
+
|
1411
|
+
<p>raise [SteamCondenserException] if an error occurs while fetching the
|
1412
|
+
leaderboard</p>
|
1413
|
+
|
1414
|
+
|
1415
|
+
</div>
|
1416
|
+
</div>
|
1417
|
+
<div class="tags">
|
1418
|
+
<h3>Parameters:</h3>
|
1419
|
+
<ul class="param">
|
1420
|
+
|
1421
|
+
<li>
|
1422
|
+
|
1423
|
+
<span class='name'>first</span>
|
1424
|
+
|
1425
|
+
|
1426
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
1427
|
+
|
1428
|
+
|
1429
|
+
|
1430
|
+
—
|
1431
|
+
<div class='inline'><p>The first entry to return from the leaderboard</p>
|
1432
|
+
</div>
|
1433
|
+
|
1434
|
+
</li>
|
1435
|
+
|
1436
|
+
<li>
|
1437
|
+
|
1438
|
+
<span class='name'>last</span>
|
1439
|
+
|
1440
|
+
|
1441
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
1442
|
+
|
1443
|
+
|
1444
|
+
|
1445
|
+
—
|
1446
|
+
<div class='inline'><p>The last entry to return from the leaderboard</p>
|
1447
|
+
</div>
|
1448
|
+
|
1449
|
+
</li>
|
1450
|
+
|
1451
|
+
</ul>
|
1452
|
+
|
1453
|
+
<h3>Returns:</h3>
|
1454
|
+
<ul class="return">
|
1455
|
+
|
1456
|
+
<li>
|
1457
|
+
|
1458
|
+
|
1459
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="GameLeaderboardEntry.html" title="SteamCondenser::GameLeaderboardEntry (class)">GameLeaderboardEntry</a></span>></tt>)</span>
|
1460
|
+
|
1461
|
+
|
1462
|
+
|
1463
|
+
—
|
1464
|
+
<div class='inline'><p>The entries that match the given
|
1465
|
+
rank range</p>
|
1466
|
+
</div>
|
1467
|
+
|
1468
|
+
</li>
|
1469
|
+
|
1470
|
+
</ul>
|
1471
|
+
<h3>Raises:</h3>
|
1472
|
+
<ul class="raise">
|
1473
|
+
|
1474
|
+
<li>
|
1475
|
+
|
1476
|
+
|
1477
|
+
<span class='type'>(<tt><span class='object_link'><a href="Error.html" title="SteamCondenser::Error (class)">Error</a></span></tt>)</span>
|
1478
|
+
|
1479
|
+
|
1480
|
+
|
1481
|
+
</li>
|
1482
|
+
|
1483
|
+
</ul>
|
1484
|
+
|
1485
|
+
</div><table class="source_code">
|
1486
|
+
<tr>
|
1487
|
+
<td>
|
1488
|
+
<pre class="lines">
|
1489
|
+
|
1490
|
+
|
1491
|
+
145
|
1492
|
+
146
|
1493
|
+
147
|
1494
|
+
148
|
1495
|
+
149
|
1496
|
+
150
|
1497
|
+
151
|
1498
|
+
152
|
1499
|
+
153
|
1500
|
+
154
|
1501
|
+
155
|
1502
|
+
156
|
1503
|
+
157
|
1504
|
+
158
|
1505
|
+
159
|
1506
|
+
160
|
1507
|
+
161
|
1508
|
+
162
|
1509
|
+
163
|
1510
|
+
164
|
1511
|
+
165
|
1512
|
+
166
|
1513
|
+
167
|
1514
|
+
168
|
1515
|
+
169</pre>
|
1516
|
+
</td>
|
1517
|
+
<td>
|
1518
|
+
<pre class="code"><span class="info file"># File 'lib/steam/community/game_leaderboard.rb', line 145</span>
|
1519
|
+
|
1520
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_entry_range identifier id'>entry_range</span><span class='lparen token'>(</span><span class='rubyid_first identifier id'>first</span><span class='comma token'>,</span> <span class='rubyid_last identifier id'>last</span><span class='rparen token'>)</span>
|
1521
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_last identifier id'>last</span> <span class='lt op'><</span> <span class='rubyid_first identifier id'>first</span>
|
1522
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span>
|
1523
|
+
<span class='string val'>'First entry must be prior to last entry for leaderboard entry lookup.'</span>
|
1524
|
+
<span class='rubyid_end end kw'>end</span>
|
1525
|
+
|
1526
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_last identifier id'>last</span> <span class='minus op'>-</span> <span class='rubyid_first identifier id'>first</span><span class='rparen token'>)</span> <span class='gt op'>></span> <span class='integer val'>5000</span>
|
1527
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span>
|
1528
|
+
<span class='string val'>'Leaderboard entry lookup is currently limited to a maximum of 5001 entries per request.'</span>
|
1529
|
+
<span class='rubyid_end end kw'>end</span>
|
1530
|
+
|
1531
|
+
<span class='rubyid_url identifier id'>url</span> <span class='assign token'>=</span> <span class='dstring node'>"#@url&start=#{first}&end=#{last}"</span>
|
1532
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span> <span class='assign token'>=</span> <span class='rubyid_MultiXml constant id'>MultiXml</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_url identifier id'>url</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='symbol val'>:proxy</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_values identifier id'>values</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
|
1533
|
+
|
1534
|
+
<span class='rubyid_error identifier id'>error</span> <span class='assign token'>=</span> <span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'error'</span><span class='rbrack token'>]</span>
|
1535
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Error constant id'>Error</span><span class='comma token'>,</span> <span class='rubyid_error identifier id'>error</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_error identifier id'>error</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
1536
|
+
|
1537
|
+
<span class='rubyid_entries identifier id'>entries</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
1538
|
+
<span class='rubyid_xml_data identifier id'>xml_data</span><span class='lbrack token'>[</span><span class='string val'>'entries'</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='string val'>'entry'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_entry_data identifier id'>entry_data</span><span class='bitor op'>|</span>
|
1539
|
+
<span class='rubyid_rank identifier id'>rank</span> <span class='assign token'>=</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='lbrack token'>[</span><span class='string val'>'rank'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
1540
|
+
<span class='rubyid_entries identifier id'>entries</span><span class='lbrack token'>[</span><span class='rubyid_rank identifier id'>rank</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_GameLeaderboardEntry constant id'>GameLeaderboardEntry</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_entry_data identifier id'>entry_data</span><span class='comma token'>,</span> <span class='rubyid_self self kw'>self</span>
|
1541
|
+
<span class='rubyid_end end kw'>end</span>
|
1542
|
+
|
1543
|
+
<span class='rubyid_entries identifier id'>entries</span>
|
1544
|
+
<span class='rubyid_end end kw'>end</span>
|
1545
|
+
</pre>
|
1546
|
+
</td>
|
1547
|
+
</tr>
|
1548
|
+
</table>
|
1549
|
+
</div>
|
1550
|
+
|
1551
|
+
</div>
|
1552
|
+
|
1553
|
+
</div>
|
1554
|
+
|
1555
|
+
<div id="footer">
|
1556
|
+
Generated on Mon Apr 30 07:03:06 2012 by
|
1557
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1558
|
+
0.7.5 (ruby-1.8.7).
|
1559
|
+
</div>
|
1560
|
+
|
1561
|
+
</body>
|
1562
|
+
</html>
|