taric 1.0.0 → 2.0.0.pre.alpha

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: e1f94f1069841bb455489c42bcca6d841e5ffc8f
4
- data.tar.gz: cf3eaa6228e798e76e1ceb7bea026339161a2b19
3
+ metadata.gz: db5b824f883e1ae377ccd02bbac836d384e14c05
4
+ data.tar.gz: 2cdec9f0074ae413b71a7da6f2d04ad08c44c71a
5
5
  SHA512:
6
- metadata.gz: eafb2cdb0de729cd167c407829431106b5673ce2bf01658091d954c7d78ddcb6e1e41b3b8cad59e3bb92bb6e375003072dca6f6fd8959ac6baa5d3979c11f6ba
7
- data.tar.gz: ddc554cf1f823a1e409529db2f54ad4d07b03c4ef908a4699caeb72768d231cedd9a203680d47310748be25d29aa30860262e31141a523e9d8b6d650e3c24553
6
+ metadata.gz: d15849dd1428d793202e9d634c04651e57d470e33cd60f43238f175d9c34eac53ebb7f257d518bc058288fd4677e80da31b66d8088ba6a33d244e0f23ce0e32e
7
+ data.tar.gz: 15331fe39e484ec6b07bceedfe107a0fad4b61f12665afe59c98ee673bc7c4a8d3b82fed1ad80bc590bbe600aab5c5450681c056c37315cf91366a9f2b69e5c2
data/README.md CHANGED
@@ -46,21 +46,8 @@ Or install it yourself as:
46
46
  - [x] MATCH-V3
47
47
  - [x] RUNES-V3
48
48
  - [x] SPECTATOR-V3
49
- - [x] STATIC-DATA-V3
49
+ - [x] ~~STATIC-DATA-V3~~ removed by Riot
50
50
  - [x] SUMMONER-V3
51
- - [x] ~~CURRENT-GAME-V1.0~~ replaced by SPECTATOR-V3
52
- - [x] ~~FEATURED-GAMES-V1.0~~ replaced by SPECTATOR-V3
53
- - [x] ~~GAME-V1.3~~ replaced by MATCH-V3
54
- - [x] ~~LEAGUE-V2.5~~ replaced by LEAGUE-V3
55
- - [x] ~~LOL-STATIC-DATA-V1.2~~ replaced by STATIC-DATA-V3
56
- - [x] ~~LOL-STATUS-V1.0~~ replaced by LOL-STATUS-V3
57
- - [x] ~~MATCH-V2.2~~ replaced by MATCH-V3
58
- - [x] ~~MATCHLIST-V2.2~~ replaced by MATCH-V3
59
- - [x] ~~RUNES-MASTERIES-V1.4~~ replaced by RUNES-V3 AND MASTERIES-V3
60
- - [x] ~~CHAMPION-V1.2~~ replaced by CHAMPION-V3
61
- - [x] ~~CHAMPIONMASTERY~~ replaced by CHAMPION-MASTERY-V3
62
- - [x] ~~STATS-V1.3~~ no replacement
63
- - [x] ~~SUMMONER-V1.4~~ replaced by SUMMONER-V3
64
51
 
65
52
  ## Configuration
66
53
 
@@ -125,6 +112,14 @@ parallel_client = client.in_parallel.match(id: 1).match(id: 42)
125
112
  responses = parallel_client.execute!
126
113
  ```
127
114
 
115
+ ### CHAMPION-MASTERY-V3
116
+ ```ruby
117
+ champion_masteries_for_summoner = client.champion_masteries(summoner_id: 21066).body
118
+ champion_mastery_for_summoner = client.champion_mastery(summoner_id:21066, champion_id:89).body
119
+ mastery_score_for_summoner = client.champion_mastery_score(summoner_id: 21066).body
120
+ ```
121
+
122
+
128
123
  ### Champion
129
124
 
130
125
  ```ruby
@@ -1,7 +1,6 @@
1
1
  require_relative 'champion'
2
2
  require_relative 'champion_mastery'
3
3
  require_relative 'league'
4
- require_relative 'lol_static_data'
5
4
  require_relative 'lol_status'
6
5
  require_relative 'masteries'
7
6
  require_relative 'match'
@@ -16,7 +15,6 @@ module Taric
16
15
  include Taric::Operation::Champion
17
16
  include Taric::Operation::ChampionMastery
18
17
  include Taric::Operation::League
19
- include Taric::Operation::LolStaticData
20
18
  include Taric::Operation::LolStatus
21
19
  include Taric::Operation::Masteries
22
20
  include Taric::Operation::Match
@@ -1,3 +1,3 @@
1
1
  module Taric
2
- VERSION = '1.0.0'
2
+ VERSION = '2.0.0-alpha'
3
3
  end
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: 1.0.0
4
+ version: 2.0.0.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Yi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -229,7 +229,6 @@ files:
229
229
  - lib/taric/operation/champion_mastery.rb
230
230
  - lib/taric/operation/endpoint_template.rb
231
231
  - lib/taric/operation/league.rb
232
- - lib/taric/operation/lol_static_data.rb
233
232
  - lib/taric/operation/lol_status.rb
234
233
  - lib/taric/operation/masteries.rb
235
234
  - lib/taric/operation/match.rb
@@ -253,9 +252,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
252
  version: 2.1.0
254
253
  required_rubygems_version: !ruby/object:Gem::Requirement
255
254
  requirements:
256
- - - ">="
255
+ - - ">"
257
256
  - !ruby/object:Gem::Version
258
- version: '0'
257
+ version: 1.3.1
259
258
  requirements: []
260
259
  rubyforge_project:
261
260
  rubygems_version: 2.5.1
@@ -1,286 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'base'
3
- require_relative 'endpoint_template'
4
- module Taric
5
- module Operation
6
- module LolStaticData
7
- include Taric::Operation::Base
8
-
9
- BASE_STATIC_URL = "https://{host}/lol/static-data/v3"
10
-
11
- STATIC_CHAMPIONS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/champions{?dataById,champListData,locale,version}")
12
- STATIC_CHAMPION = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/champions/{id}{?champData,locale,version}")
13
- STATIC_ITEMS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/items{?itemListData,locale,version}")
14
- STATIC_ITEM = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/items/{id}{?itemData,locale,version}")
15
- STATIC_LANGUAGE_STRINGS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/language-strings{locale,version}")
16
- STATIC_LANGUAGES = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/languages{?api_key}")
17
- STATIC_MAP = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/maps{locale,version}")
18
- STATIC_MASTERIES = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/masteries{masteryListData,locale,version}")
19
- STATIC_MASTERY = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/masteries/{id}{masteryData,locale,version}")
20
- STATIC_PROFILE_ICONS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/profile-icons{locale,version}")
21
- STATIC_REALM = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/realms{?api_key}")
22
- STATIC_RUNES = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/runes{runeListData,locale,version}")
23
- STATIC_RUNE = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/runes/{id}{runeData,locale,version}")
24
- STATIC_SUMMONER_SPELLS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/summoner-spells{spellData,locale,version}")
25
- STATIC_SUMMONER_SPELL = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/summoner-spells/{id}{spellData,locale,version}")
26
- STATIC_VERSIONS = EndpointTemplate.new(template_url: "#{BASE_STATIC_URL}/versions")
27
-
28
- CHAMP_DATA_OPTIONS = [
29
- 'all'.freeze,
30
- 'allytips'.freeze,
31
- 'altimages'.freeze,
32
- 'blurb'.freeze,
33
- 'enemytips'.freeze,
34
- 'image'.freeze,
35
- 'info'.freeze,
36
- 'lore'.freeze,
37
- 'partype'.freeze,
38
- 'passive'.freeze,
39
- 'recommended'.freeze,
40
- 'skins'.freeze,
41
- 'stats'.freeze,
42
- 'tags'.freeze
43
- ]
44
-
45
- ITEM_DATA_OPTIONS = [
46
- 'all'.freeze,
47
- 'colloq'.freeze,
48
- 'consumeOnFull'.freeze,
49
- 'consumed'.freeze,
50
- 'depth'.freeze,
51
- 'from'.freeze,
52
- 'gold'.freeze,
53
- 'groups'.freeze,
54
- 'hideFromAll'.freeze,
55
- 'image'.freeze,
56
- 'inStore'.freeze,
57
- 'into'.freeze,
58
- 'maps'.freeze,
59
- 'requiredChampion'.freeze,
60
- 'sanitizedDescription'.freeze,
61
- 'specialRecipe'.freeze,
62
- 'stacks'.freeze,
63
- 'stats'.freeze,
64
- 'tags'.freeze,
65
- 'tree'.freeze
66
- ].freeze
67
-
68
- MASTERY_DATA_OPTIONS = [
69
- 'all'.freeze,
70
- 'image'.freeze,
71
- 'masteryTree'.freeze,
72
- 'prereq'.freeze,
73
- 'ranks'.freeze,
74
- 'sanitizedDescription'.freeze
75
- ].freeze
76
-
77
- SPELL_DATA_OPTIONS = [
78
- 'all'.freeze,
79
- 'cooldown'.freeze,
80
- 'cooldownBurn'.freeze,
81
- 'cost'.freeze,
82
- 'costType'.freeze,
83
- 'effect'.freeze,
84
- 'effectBurn'.freeze,
85
- 'image'.freeze,
86
- 'key'.freeze,
87
- 'leveltip'.freeze,
88
- 'maxrank'.freeze,
89
- 'modes'.freeze,
90
- 'range'.freeze,
91
- 'rangeBurn'.freeze,
92
- 'resource'.freeze,
93
- 'sanitizedDescription'.freeze,
94
- 'sanitizedTooltip'.freeze,
95
- 'tooltip'.freeze,
96
- 'vars'.freeze
97
- ].freeze
98
-
99
- # locales mapped to languages
100
- LOCALE = {
101
- bg_BG: 'Bulgarian (Bulgaria)',
102
- cs_CZ: 'Czech (Czech Republic)',
103
- de_DE: 'German (Germany)',
104
- el_GR: 'Greek (Greece)',
105
- en_AU: 'English (Australia)',
106
- en_GB: 'English (United Kingdom)',
107
- en_PH: 'English (Republic of the Philippines)',
108
- en_PL: 'English (Poland)',
109
- en_SG: 'English (Singapore)',
110
- en_US: 'English (United States)',
111
- es_AR: 'Spanish (Argentina)',
112
- es_ES: 'Spanish (Spain)',
113
- es_MX: 'Spanish (Mexico)',
114
- fr_FR: 'French (France)',
115
- hu_HU: 'Hungarian (Hungary)',
116
- id_ID: 'Indonesian (Indonesia)',
117
- it_IT: 'Italian (Italy)',
118
- ja_JP: 'Japanese (Japan)',
119
- ko_KR: 'Korean (Korea)',
120
- nl_NL: 'Dutch (Netherlands)',
121
- ms_MY: 'Malay (Malaysia)',
122
- pl_PL: 'Polish (Poland)',
123
- pt_BR: 'Portuguese (Brazil)',
124
- pt_PT: 'Portuguese (Portugal)',
125
- ro_RO: 'Romanian (Romania)',
126
- ru_RU: 'Russian (Russia)',
127
- th_TH: 'Thai (Thailand)',
128
- tr_TR: 'Turkish (Turkey)',
129
- vn_VN: 'Vietnamese (Viet Nam)',
130
- zh_CN: 'Chinese (China)',
131
- zh_MY: 'Chinese (Malaysia)',
132
- zh_TW: 'Chinese (Taiwan)'
133
- }
134
-
135
- LOCALE_KEYS = LOCALE.keys
136
-
137
- # Static data for champions
138
- #
139
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getChampionList
140
- # @param data_by_id [Boolean] optional, if true, champion data keyed to IDs
141
- # @param champ_list_data [String] optional, filter from [CHAMP_DATA_OPTIONS]
142
- # @param locale [Symbol] optional, results will be in locale [LOCALE], or default for region if nil
143
- # @param version [String] optional, enforces version of static data, or latest if nil
144
- #
145
- # @return [Hash] of static champion data
146
- #
147
- # @example
148
- # # Defaults
149
- # champions = client.static_champions
150
- # # Mapped by IDs
151
- # champions = client.static_champions(data_by_id: true)
152
- def static_champions(data_by_id: nil, locale: nil, champ_list_data: nil, version: nil)
153
- response_for STATIC_CHAMPIONS, {locale: locale, dataById: data_by_id, champListData: champ_list_data, version: version}
154
- end
155
-
156
- # Static data for champion by id
157
- #
158
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getChampionById
159
- # @param id [Fixnum] id of champion
160
- # @param champ_data [String] optional, filter from [CHAMP_DATA_OPTIONS]
161
- # @param locale [Symbol] optional, results will be in locale [LOCALE], or default for region if nil
162
- # @param version [String] optional, enforces version of static data, or latest if nil
163
- #
164
- # @return [Hash] of static champion data
165
- #
166
- # @example
167
- # champions = client.static_champions(id: 44)
168
- def static_champion(id:, champ_data: nil, locale: nil, version: nil)
169
- response_for STATIC_CHAMPION, {id: id, champData: champ_data, locale: locale, version: version}
170
- end
171
-
172
- # Static data for items
173
- #
174
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getItemList
175
- # @param item_list_data [String] optional, filter from [ITEM_DATA_OPTIONS]
176
- # @param locale [Symbol] optional, results will be in locale [LOCALE], or default for region if nil
177
- # @param version [String] optional, enforces version of static data, or latest if nil
178
- #
179
- # @return [Hash] of static item data
180
- #
181
- # @example
182
- # # Defaults
183
- # champions = client.static_items
184
- def static_items(item_list_data: nil, locale: nil, version: nil)
185
- response_for STATIC_ITEMS, {itemListData: item_list_data, locale: locale, version: version}
186
- end
187
-
188
- # Static data for item by id
189
- #
190
- # @see https://developer.riotgames.com/api/methods#!/968/3319
191
- # @param id [Fixnum] id of item
192
- # @param item_data_option [String] optional, filter from [ITEM_DATA_OPTIONS]
193
- # @param locale [Symbol] optional, results will be in locale [LOCALE], or default for region if nil
194
- # @param version [String] optional, enforces version of static data, or latest if nil
195
- #
196
- # @return [Hash] of static item data for id
197
- #
198
- # @example
199
- # item = client.static_item(id: 2049)
200
- def static_item(id:, item_data: nil, locale: nil, version: nil)
201
- response_for STATIC_ITEM, {id: id, itemData: item_data, locale: locale, version: version}
202
- end
203
-
204
- # Returns [Hash] of language string data.
205
- #
206
- # @see https://developer.riotgames.com/api/methods#!/968/3316
207
- # @param locale [Symbol] optional, results will be in locale [LOCALE], or default for region if nil
208
- # @param version [String] optional, enforces version of static data, or latest if nil
209
- # @return [Hash] of language string data
210
- # @example
211
- # language_strings = client.static_language_strings
212
- def static_language_strings(locale: nil, version: nil)
213
- response_for STATIC_LANGUAGE_STRINGS, {locale: locale, version: version}
214
- end
215
-
216
- # Returns [Array] of languages.
217
- #
218
- # @see https://developer.riotgames.com/api/methods#!/968/3324
219
- # @return [Array] of languages
220
- # @example
221
- # languages = client.static_languages
222
- def static_languages
223
- response_for STATIC_LANGUAGES
224
- end
225
-
226
- # Maps available.
227
- # @see https://developer.riotgames.com/api/methods#!/968/3328
228
- # @param locale [String] filter by locale
229
- # @param version [String] patch version
230
- # @return [Hash] of maps available.
231
- def static_maps(locale: nil, version: nil)
232
- response_for STATIC_MAP, {locale: locale, version: version}
233
- end
234
-
235
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getMasteryList
236
- def static_masteries(mastery_list_data: nil, locale: nil, version: nil)
237
- response_for STATIC_MASTERIES, {masteryListData: mastery_list_data, locale: locale, version: version}
238
- end
239
-
240
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getMasteryById
241
- def static_mastery(id:, mastery_data: nil, locale: nil, version: nil)
242
- response_for STATIC_MASTERY, {id: id, masteryData: mastery_data, locale:locale, version: version}
243
- end
244
-
245
- # @see https://developer.riotgames.com/api/methods#!/968/3325
246
- def static_profile_icons(locale: nil, version: nil)
247
- response_for STATIC_PROFILE_ICONS, {locale: locale, version: version}
248
- end
249
-
250
- # @see https://developer.riotgames.com/api/methods#!/968/3325
251
- def static_realms
252
- response_for STATIC_REALM
253
- end
254
-
255
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getRuneList
256
- def static_runes(rune_list_data: nil, locale: nil, version: nil)
257
- response_for STATIC_RUNES, {runeListData: rune_list_data, locale: locale, version: version}
258
- end
259
-
260
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getRuneById
261
- def static_rune(id:, rune_data: nil, locale: nil, version: nil)
262
- response_for STATIC_RUNE, {id: id, runeData: rune_data, locale: locale, version: version}
263
- end
264
-
265
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getSummonerSpellList
266
- def static_summoner_spells(spell_list_data: nil, locale: nil, version: nil, data_by_id: nil)
267
- response_for STATIC_SUMMONER_SPELLS, {spellListData: spell_list_data, locale: locale, version: version, dataById: data_by_id}
268
- end
269
-
270
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getSummonerSpellById
271
- def static_summoner_spell(id:, spell_data: nil, locale: nil, version: nil)
272
- response_for STATIC_SUMMONER_SPELL, {id: id, spellData: spell_data, locale: locale, version: version}
273
- end
274
-
275
- # Returns [Array] of static data version numbers.
276
- #
277
- # @see https://developer.riotgames.com/api-methods/#static-data-v3/GET_getVersions
278
- # @return [Array] of version numbers
279
- # @example
280
- # versions = client.static_versions
281
- def static_versions
282
- response_for STATIC_VERSIONS
283
- end
284
- end
285
- end
286
- end