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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/league_api.rb +8 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b7c85b99ad4b9cdd68321e0c71ac397884bd07b
4
- data.tar.gz: 8c168145d750c6c6f5926b4150aaae91719ac790
3
+ metadata.gz: 6ab9aa8ed90e3bd2748611dfef13725876d935ef
4
+ data.tar.gz: 96f77475a20e3558c2fa006e715e0d7c199f9aa6
5
5
  SHA512:
6
- metadata.gz: 7e4307b067ae8349dbf168dc2377f9292aea7dded8ec163ea5f8440a8290b57639ba875bed088030223e97865d158d52c0ce4d8bd72e0db274d8a3f8bf7bb249
7
- data.tar.gz: ff660162ca605fae95818e6039b4749f4bec3d4f88df334d8c67bc7e5291b63452fc699709317922ad4650dd44980c9db77091a3647608d4fc246d05a99b1a4d
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: league_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DanBradbury