taric 2.0.0.pre.alpha → 2.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -10
- data/lib/taric/operation/api.rb +0 -2
- data/lib/taric/operation/champion.rb +10 -25
- data/lib/taric/version.rb +1 -1
- metadata +2 -3
- data/lib/taric/operation/runes.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d8c2488f41edf45cf27742797022387702b9c9d
|
4
|
+
data.tar.gz: eb33c2a4f2dd13e125ef715d7881c13b04120fe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41baee0c0aebbdb578ce0dc052cf15e61484f37846a1a2b4fe4a357fe6aa7a9d5d7628f29e6f100e3b30e35f95468f002c1703e0e5e6205df4f270d52972eb0e
|
7
|
+
data.tar.gz: 3cbbe622a9fa7df649021a78c776dd8ed7d522e65715fa54e74a4057b96295ba6abed5b4bc90210bc28afdace21e6d026e18256d5207c2ada01f6d9e610181bc
|
data/README.md
CHANGED
@@ -44,9 +44,7 @@ Or install it yourself as:
|
|
44
44
|
- [x] LOL-STATUS-V3
|
45
45
|
- [x] MASTERIES-V3
|
46
46
|
- [x] MATCH-V3
|
47
|
-
- [x] RUNES-V3
|
48
47
|
- [x] SPECTATOR-V3
|
49
|
-
- [x] ~~STATIC-DATA-V3~~ removed by Riot
|
50
48
|
- [x] SUMMONER-V3
|
51
49
|
|
52
50
|
## Configuration
|
@@ -71,7 +69,7 @@ There are a couple of ways to set the API key:
|
|
71
69
|
require 'typhoeus/adapters/faraday'
|
72
70
|
|
73
71
|
Taric.configure! do |config|
|
74
|
-
config.api_key = '
|
72
|
+
config.api_key = 'RGAPI-858c3371-e85d-4036-95ff-1427224cd1f2'
|
75
73
|
config.adapter = :typhoeus # default is Faraday.default_adapter
|
76
74
|
end
|
77
75
|
```
|
@@ -119,21 +117,16 @@ champion_mastery_for_summoner = client.champion_mastery(summoner_id:21066, champ
|
|
119
117
|
mastery_score_for_summoner = client.champion_mastery_score(summoner_id: 21066).body
|
120
118
|
```
|
121
119
|
|
122
|
-
|
123
120
|
### Champion
|
124
121
|
|
125
122
|
```ruby
|
126
|
-
client.champion
|
127
|
-
```
|
128
|
-
|
129
|
-
```ruby
|
130
|
-
client.champions
|
123
|
+
client.champion.champion_rotations.body
|
131
124
|
```
|
132
125
|
|
133
126
|
### Current Game
|
134
127
|
|
135
128
|
```ruby
|
136
|
-
response = client.current_game(summoner_id: 21066)
|
129
|
+
response = client.current_game(summoner_id: 21066).body
|
137
130
|
```
|
138
131
|
|
139
132
|
### Featured Games
|
data/lib/taric/operation/api.rb
CHANGED
@@ -4,7 +4,6 @@ require_relative 'league'
|
|
4
4
|
require_relative 'lol_status'
|
5
5
|
require_relative 'masteries'
|
6
6
|
require_relative 'match'
|
7
|
-
require_relative 'runes'
|
8
7
|
require_relative 'spectator'
|
9
8
|
require_relative 'summoner'
|
10
9
|
|
@@ -18,7 +17,6 @@ module Taric
|
|
18
17
|
include Taric::Operation::LolStatus
|
19
18
|
include Taric::Operation::Masteries
|
20
19
|
include Taric::Operation::Match
|
21
|
-
include Taric::Operation::Runes
|
22
20
|
include Taric::Operation::Spectator
|
23
21
|
include Taric::Operation::Summoner
|
24
22
|
|
@@ -6,35 +6,20 @@ module Taric
|
|
6
6
|
module Champion
|
7
7
|
include Taric::Operation::Base
|
8
8
|
|
9
|
-
|
9
|
+
CHAMPION_ROTATIONS = EndpointTemplate.new(template_url: "https://{host}/lol/platform/v3/champion-rotations")
|
10
10
|
|
11
|
-
|
12
|
-
CHAMPION_BY_ID = EndpointTemplate.new(template_url: "#{CHAMPION_BASE_URL}/{id}")
|
13
|
-
|
14
|
-
# Returns champion data.
|
15
|
-
#
|
16
|
-
# @see https://developer.riotgames.com/api/methods#!/958/3290
|
17
|
-
# @param free_to_play [Boolean] optional, nil returns all, true or false to filter if they're free to play or not
|
18
|
-
# @return [Hash] embedding [Array] of champions keyed off of "champions"
|
19
|
-
#
|
20
|
-
# @example
|
21
|
-
# all_champions = client.champions["champions"]
|
22
|
-
# free_champions = client.champions(free_to_play: true)["champions"]
|
23
|
-
# nonfree_champions = client.champions(free_to_play: false)["champions"]
|
24
|
-
def champions(free_to_play: nil)
|
25
|
-
response_for CHAMPIONS, freeToPlay: free_to_play
|
26
|
-
end
|
27
|
-
|
28
|
-
# Returns champion data by id.
|
11
|
+
# Returns champion rotations, including free-to-play and low-level free-to-play rotations
|
29
12
|
#
|
30
|
-
# @see https://developer.riotgames.com/api
|
31
|
-
# @
|
32
|
-
# @return [Hash] of champion data
|
13
|
+
# @see https://developer.riotgames.com/api-methods/#champion-v3/GET_getChampionInfo Champion Rotations
|
14
|
+
# @return [Hash] of free champion ids, free new player champion ids, and new player max level
|
33
15
|
#
|
34
16
|
# @example
|
35
|
-
#
|
36
|
-
|
37
|
-
|
17
|
+
# champion_rotations = client.champion_rotations.body
|
18
|
+
# free_champion_ids = champion_rotations['freeChampionIds']
|
19
|
+
# new_player_champion_ids = champion_rotations['freeChampionIdsForNewPlayers']
|
20
|
+
# max_new_player_level = champion_rotations['maxNewPlayerLevel']
|
21
|
+
def champion_rotations
|
22
|
+
response_for CHAMPION_ROTATIONS
|
38
23
|
end
|
39
24
|
end
|
40
25
|
end
|
data/lib/taric/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.alpha
|
4
|
+
version: 2.0.0.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Yi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -232,7 +232,6 @@ files:
|
|
232
232
|
- lib/taric/operation/lol_status.rb
|
233
233
|
- lib/taric/operation/masteries.rb
|
234
234
|
- lib/taric/operation/match.rb
|
235
|
-
- lib/taric/operation/runes.rb
|
236
235
|
- lib/taric/operation/spectator.rb
|
237
236
|
- lib/taric/operation/summoner.rb
|
238
237
|
- lib/taric/version.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require_relative 'endpoint_template'
|
3
|
-
module Taric
|
4
|
-
module Operation
|
5
|
-
module Runes
|
6
|
-
|
7
|
-
RUNES_V3 = EndpointTemplate.new(template_url: 'https://{host}/lol/platform/v3/runes/by-summoner/{summonerId}')
|
8
|
-
|
9
|
-
# Runes by summoner ID.
|
10
|
-
#
|
11
|
-
# @param summoner_id [Fixnum] Summoner ID
|
12
|
-
# @return [Hash] runes for Summoner ID
|
13
|
-
def runes(summoner_id: )
|
14
|
-
response_for RUNES_V3, {summonerId: summoner_id}
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|