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 +4 -4
- data/lib/lol/static_request.rb +7 -2
- data/lib/lol/version.rb +1 -1
- data/spec/api_version_spec.rb +1 -1
- data/spec/fixtures/v1.2/get-champion-by-id.json +6 -0
- data/spec/fixtures/v1.2/get-item-by-id.json +6 -0
- data/spec/fixtures/v1.2/get-item.json +1563 -0
- data/spec/fixtures/v1.2/get-mastery-by-id.json +9 -0
- data/spec/fixtures/v1.2/get-mastery.json +389 -0
- data/spec/fixtures/v1.2/get-realm.json +1 -0
- data/spec/fixtures/v1.2/get-rune-by-id.json +26 -0
- data/spec/fixtures/v1.2/get-rune.json +2966 -0
- data/spec/fixtures/v1.2/get-static-champion.json +714 -0
- data/spec/fixtures/v1.2/get-summoner-spell-by-id.json +39 -0
- data/spec/fixtures/v1.2/get-summoner-spell.json +97 -0
- data/spec/fixtures/v1.2/get-versions.json +1 -0
- data/spec/lol/static_request_spec.rb +24 -4
- metadata +26 -24
- data/spec/fixtures/v1/get-champion-by-id.json +0 -952
- data/spec/fixtures/v1/get-champion.json +0 -708
- data/spec/fixtures/v1/get-item-by-id.json +0 -5
- data/spec/fixtures/v1/get-item.json +0 -982
- data/spec/fixtures/v1/get-mastery-by-id.json +0 -9
- data/spec/fixtures/v1/get-mastery.json +0 -1359
- data/spec/fixtures/v1/get-realm.json +0 -18
- data/spec/fixtures/v1/get-rune-by-id.json +0 -22
- data/spec/fixtures/v1/get-rune.json +0 -6465
- data/spec/fixtures/v1/get-summoner-spell-by-id.json +0 -64
- data/spec/fixtures/v1/get-summoner-spell.json +0 -657
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be72c6dfb95b66a918e54c06acab06649ee59bdb
|
4
|
+
data.tar.gz: 8d9050dfd7b400ca1d324aa805bca165d621326c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ab433b4b2388399a119e61f8910061ac4a090c970434f9ba5aed9380177faf228988eb63d30dd7bf2c13f10b20905e261a4eb4bc253876211487744acb66aaa
|
7
|
+
data.tar.gz: 9b7ddf4bced170d774b569a93fcf2a0347be850392a585ecf4ae2f6266cd12582968ee6fb10b64feb41c1713ffb68820291f887574ad3a4405df75ad7fb1e5c8
|
data/lib/lol/static_request.rb
CHANGED
@@ -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
|
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
data/spec/api_version_spec.rb
CHANGED
@@ -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
|
+
}
|