league_api 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/league_api.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab9aa8ed90e3bd2748611dfef13725876d935ef
|
4
|
+
data.tar.gz: 96f77475a20e3558c2fa006e715e0d7c199f9aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 339008129b8d1e6302aae149f673f34b50ea1226ae17a8d458879db6ed28454b6f35ab9cc27dddc3eaf594a1024f704ad8ce15d485c2eebc253ea0bac29b8876
|
7
|
+
data.tar.gz: f2ca5da0b29ef95cc0ea7d5dd45d7ec4e39686861798d2ab973ee002b523430a86316f30ed4b75fea024bf2e18e5c9b1f6231af2777da2ed2202d88e6050580b
|
data/lib/league_api.rb
CHANGED
@@ -115,24 +115,24 @@ module LeagueApi
|
|
115
115
|
end
|
116
116
|
|
117
117
|
# Return player id given the summoner name
|
118
|
-
def get_summoner_id(str)
|
119
|
-
Summoner.find_by_name(str)["id"]
|
118
|
+
def get_summoner_id(str, region=nil)
|
119
|
+
Summoner.find_by_name(str, region)["id"]
|
120
120
|
end
|
121
121
|
|
122
122
|
# Return unformatted JSON of the last game played
|
123
|
-
def get_last_game_played(id)
|
124
|
-
Game.recent_games(id).first
|
123
|
+
def get_last_game_played(id, region=nil)
|
124
|
+
Game.recent_games(id, region).first
|
125
125
|
end
|
126
126
|
|
127
127
|
# Return a String for the last champion played
|
128
|
-
def get_last_champion_played(id)
|
129
|
-
champ_id = Game.recent_games(id).first["championId"]
|
128
|
+
def get_last_champion_played(id, region=nil)
|
129
|
+
champ_id = Game.recent_games(id, region).first["championId"]
|
130
130
|
Static.get_inverted_champion_list[champ_id]
|
131
131
|
end
|
132
132
|
|
133
133
|
# Return the Time for the last played game
|
134
|
-
def get_time_of_last_game(id)
|
135
|
-
Time.at( Game.recent_games(id).first["createDate"] / 1000 )
|
134
|
+
def get_time_of_last_game(id, region=nil)
|
135
|
+
Time.at( Game.recent_games(id, region).first["createDate"] / 1000 )
|
136
136
|
end
|
137
137
|
|
138
138
|
end
|