ruby-lol 0.9.14 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81dabecfe271cb17a25f3533ccd1a34455e93847
4
- data.tar.gz: dba729c13e5c7a801bdcd28bd9efc5f089e0c55a
3
+ metadata.gz: be72c6dfb95b66a918e54c06acab06649ee59bdb
4
+ data.tar.gz: 8d9050dfd7b400ca1d324aa805bca165d621326c
5
5
  SHA512:
6
- metadata.gz: 066470b73875a474f830f944e2f80dbd18b2ecd8025f113ea1b87140b56102c8fec34f1070106237be7f42c4613cf577d2126256b291357f74350b15bf6a1f6d
7
- data.tar.gz: 9c5c98ff2490c338924c042b24f8cda09bc475e4ab3d662f35e56512827fd1d1c91c4e10e0d2eb02df391b7b5059696bae82da82d49a00273112cf2158d1655b
6
+ metadata.gz: 4ab433b4b2388399a119e61f8910061ac4a090c970434f9ba5aed9380177faf228988eb63d30dd7bf2c13f10b20905e261a4eb4bc253876211487744acb66aaa
7
+ data.tar.gz: 9b7ddf4bced170d774b569a93fcf2a0347be850392a585ecf4ae2f6266cd12582968ee6fb10b64feb41c1713ffb68820291f887574ad3a4405df75ad7fb1e5c8
@@ -3,7 +3,7 @@ module Lol
3
3
  STANDARD_ENDPOINTS = %w(champion item mastery rune summoner_spell)
4
4
 
5
5
  def self.api_version
6
- "v1"
6
+ "v1.2"
7
7
  end
8
8
 
9
9
  # Returns a full url for an API call
@@ -22,7 +22,12 @@ module Lol
22
22
  Proxy.new self, 'realm'
23
23
  end
24
24
 
25
+ def versions
26
+ Proxy.new self, 'versions'
27
+ end
28
+
25
29
  def get(endpoint, id=nil, params={})
30
+ return perform_request(api_url("versions")).parsed_response if endpoint == "versions"
26
31
  id ? find(endpoint, id, params) : all(endpoint, params)
27
32
  end
28
33
 
@@ -34,7 +39,7 @@ module Lol
34
39
  end
35
40
 
36
41
  def all(endpoint, params={})
37
- if endpoint == "realm"
42
+ if %w(realm).include? endpoint
38
43
  model_class(endpoint).new perform_request(api_url(endpoint.dasherize, params)).to_hash
39
44
  else
40
45
  perform_request(api_url(endpoint.dasherize, params))["data"].map do |id, values|
data/lib/lol/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lol
2
- VERSION = "0.9.14"
2
+ VERSION = "0.9.15"
3
3
  end
@@ -19,5 +19,5 @@ describe "API Versions" do
19
19
  check_api_version(StatsRequest, "v1.3")
20
20
  check_api_version(SummonerRequest, "v1.4")
21
21
  check_api_version(TeamRequest, "v2.2")
22
- check_api_version(StaticRequest, "v1")
22
+ check_api_version(StaticRequest, "v1.2")
23
23
  end
@@ -0,0 +1,6 @@
1
+ {
2
+ "id": 81,
3
+ "title": "the Prodigal Explorer",
4
+ "name": "Ezreal",
5
+ "key": "Ezreal"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "id": 3065,
3
+ "plaintext": "Increases Health and healing effects",
4
+ "description": "<stats>+400 Health<br>+55 Magic Resist<br>+20 Health Regen per 5 seconds<br>+10% Cooldown Reduction<\/stats><br><br><unique>UNIQUE Passive:<\/unique> Increases self-healing, Health Regen, Lifesteal, and Spell Vamp effects by 20%.",
5
+ "name": "Spirit Visage"
6
+ }