ruby-lol 0.9.7 → 0.9.8
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/README.md +53 -53
- data/lib/lol/mastery_page.rb +3 -3
- data/lib/lol/version.rb +1 -1
- data/spec/lol/mastery_page_spec.rb +1 -1
- 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: c29561f2fc17f478d2800ff91a85d3c63a0cf07d
|
4
|
+
data.tar.gz: d6e0a9d9eda054b9e11494f99f4330dbf2beaf6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1376714d91c43d39de86f75f45a2623cfcb4886fea1d0717d095006e06e898dd535414332e087ed5431d6286a61fcf83df0562b95b0105ad24ea074b3dc9f301
|
7
|
+
data.tar.gz: 0bcf56e415922cb77cbe8341ca821d41d2e0e6b56c6db7232ac36a9fbf6b2e59c4b16ff4c45af716e26f65dc6a6cdc172362b5f6032a932afe7b70f0c2c31521
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ ruby-lol is a wrapper to the [Riot Games API](https://developer.riotgames.com).
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
|
12
|
+
gem 'ruby-lol'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -23,58 +23,58 @@ Or install it yourself as:
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
```ruby
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
26
|
+
require 'lol'
|
27
|
+
|
28
|
+
# defaults to euw
|
29
|
+
client = Lol::Client.new "my_api_key"
|
30
|
+
# => <Lol::Client:0x007fd09d1abb00 @api_key="my_api_key", @region="euw">
|
31
|
+
|
32
|
+
# na
|
33
|
+
na_client = Lol::Client.new "my_api_key", :region => "na"
|
34
|
+
# => <Lol::Client:0x007fd09d1abb00 @api_key="my_api_key", @region="na">
|
35
|
+
|
36
|
+
# Available Requests
|
37
|
+
client.champion
|
38
|
+
# => Lol::ChampionRequest
|
39
|
+
client.game
|
40
|
+
# => Lol::GameRequest
|
41
|
+
client.league
|
42
|
+
# => Lol::LeagueRequest
|
43
|
+
client.stats
|
44
|
+
# => Lol::StatsRequest
|
45
|
+
client.summoner
|
46
|
+
# => Lol::SummonerRequest
|
47
|
+
client.team
|
48
|
+
# => Lol::TeamRequest
|
49
|
+
|
50
|
+
# Available methods for each request type
|
51
|
+
client.champion.get
|
52
|
+
# => Lol::Champion
|
53
|
+
|
54
|
+
client.game.recent(summoner_id)
|
55
|
+
# => Lol::Game
|
56
|
+
|
57
|
+
client.league.get(summoner_id)
|
58
|
+
# => Lol::League
|
59
|
+
|
60
|
+
client.stats.summary(summoner_id)
|
61
|
+
# => Lol::SummaryStats
|
62
|
+
client.stats.ranked(summoner_id)
|
63
|
+
# => Lol::RankedStats
|
64
|
+
|
65
|
+
client.summoner.masteries(summoner_id)
|
66
|
+
# => [Lol::Masterypage]
|
67
|
+
client.summoner.runes(summoner_id)
|
68
|
+
# => [Lol::Runepage]
|
69
|
+
client.summoner.by_name(name)
|
70
|
+
# => Lol::Summoner
|
71
|
+
client.summoner.get(summoner_id)
|
72
|
+
# => Lol::Summoner
|
73
|
+
client.summoner.name(summoner_ids)
|
74
|
+
# => [Hash]
|
75
|
+
|
76
|
+
client.team.get(summoner_id)
|
77
|
+
# => Array
|
78
78
|
```
|
79
79
|
|
80
80
|
## Contributing
|
data/lib/lol/mastery_page.rb
CHANGED
@@ -2,8 +2,8 @@ module Lol
|
|
2
2
|
class MasteryPage < Model
|
3
3
|
|
4
4
|
# @!attribute [r] id
|
5
|
-
# @return [Fixnum]
|
6
|
-
attr_reader :
|
5
|
+
# @return [Fixnum] mastery page id
|
6
|
+
attr_reader :id
|
7
7
|
|
8
8
|
# @!attribute [r] talents
|
9
9
|
# @return [Array] array of Lol::Talent
|
@@ -19,7 +19,7 @@ module Lol
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
-
attr_writer :
|
22
|
+
attr_writer :id, :name, :current
|
23
23
|
|
24
24
|
def talents= new_talents
|
25
25
|
@talents = new_talents.map {|t| Talent.new t}
|
data/lib/lol/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe MasteryPage do
|
|
8
8
|
let(:valid_attributes) { { id: 1 } }
|
9
9
|
end
|
10
10
|
|
11
|
-
%w(
|
11
|
+
%w(id name current).each do |attribute|
|
12
12
|
it_behaves_like "plain attribute" do
|
13
13
|
let(:attribute) { attribute }
|
14
14
|
let(:attribute_value) { "asd" }
|