starcall 0.5.0 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e6005cf053fb73f0bd6dc29b8f0f9384ac3df2494428a1adb2ef891c968591d
4
- data.tar.gz: f87360fdb12ee7f030b1d87fb4572d7d081d0d82564a18488b8fd187eda3568c
3
+ metadata.gz: 29a7b323bcbf19c0a0fae436919ee5ec3d3698cc608090ef59f770dd0bef4fc1
4
+ data.tar.gz: 6ad054eb9ae3fa78169e56543753293802aca6d5f093787763ad6bd081d52e61
5
5
  SHA512:
6
- metadata.gz: ed33c6040ec1ffa32af6b2f5779066193eaffed0678dcb37ac5e58a1748615faf09d3140042ebc509d3532d59e08978269142e0e87ef3fe26b816aae0d62628a
7
- data.tar.gz: cb5f5a86413892a3d5f117b8880883e2414b9111da40588da013c2133c03c75621a44b5a28f860d5bbdf325c652778c5e8fe6b2141af034b0c4f6622e68bdfd7
6
+ metadata.gz: '099f43356b97db57e5a99b2c861014468eb03f365524acdf80346f2069b772a5618e0da21966b8465b79861b8b1cb7f6edfe93312e11c7d8a09810959e661a72'
7
+ data.tar.gz: 765b7820ae2aa969981289540efece962e485e2756761967a83a193dc94d7c8179cacd75606f5feb75ccb147acfbe41151eb0f4bd06925c4fea8440be2162ad6
@@ -13,6 +13,22 @@ None
13
13
 
14
14
  ---
15
15
 
16
+ ## v0.6.0 - Annie
17
+ ![Annie](http://ddragon.leagueoflegends.com/cdn/10.12.1/img/champion/Annie.png)
18
+
19
+ ### New features
20
+ - Add Status V3 endpoint.
21
+ - Add third party code endpoint.
22
+ - Add Spectator endpoints.
23
+
24
+ ### Changes
25
+ None
26
+
27
+ ### Bug fixes
28
+ None
29
+
30
+ ---
31
+
16
32
  ## v0.5.0 - Anivia
17
33
  ![Anivia](http://ddragon.leagueoflegends.com/cdn/10.12.1/img/champion/Anivia.png)
18
34
 
@@ -1,74 +1,74 @@
1
- PATH
2
- remote: .
3
- specs:
4
- starcall (0.5.0)
5
- httparty (~> 0.17)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.4.1)
11
- coderay (1.1.3)
12
- diff-lcs (1.3)
13
- httparty (0.18.1)
14
- mime-types (~> 3.0)
15
- multi_xml (>= 0.5.2)
16
- method_source (1.0.0)
17
- mime-types (3.3.1)
18
- mime-types-data (~> 3.2015)
19
- mime-types-data (3.2020.0512)
20
- multi_xml (0.6.0)
21
- parallel (1.19.2)
22
- parser (2.7.1.4)
23
- ast (~> 2.4.1)
24
- pry (0.13.1)
25
- coderay (~> 1.1)
26
- method_source (~> 1.0)
27
- rainbow (3.0.0)
28
- rake (12.3.3)
29
- regexp_parser (1.7.1)
30
- rexml (3.2.4)
31
- rspec (3.9.0)
32
- rspec-core (~> 3.9.0)
33
- rspec-expectations (~> 3.9.0)
34
- rspec-mocks (~> 3.9.0)
35
- rspec-core (3.9.2)
36
- rspec-support (~> 3.9.3)
37
- rspec-expectations (3.9.2)
38
- diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.9.0)
40
- rspec-mocks (3.9.1)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.9.0)
43
- rspec-support (3.9.3)
44
- rubocop (0.86.0)
45
- parallel (~> 1.10)
46
- parser (>= 2.7.0.1)
47
- rainbow (>= 2.2.2, < 4.0)
48
- regexp_parser (>= 1.7)
49
- rexml
50
- rubocop-ast (>= 0.0.3, < 1.0)
51
- ruby-progressbar (~> 1.7)
52
- unicode-display_width (>= 1.4.0, < 2.0)
53
- rubocop-ast (0.0.3)
54
- parser (>= 2.7.0.1)
55
- rubocop-rspec (1.40.0)
56
- rubocop (>= 0.68.1)
57
- ruby-progressbar (1.10.1)
58
- unicode-display_width (1.7.0)
59
-
60
- PLATFORMS
61
- ruby
62
- x64-mingw32
63
-
64
- DEPENDENCIES
65
- bundler (~> 2.0)
66
- pry (~> 0.13)
67
- rake (~> 12.3)
68
- rspec (~> 3.0)
69
- rubocop (~> 0.86)
70
- rubocop-rspec (~> 1.40)
71
- starcall!
72
-
73
- BUNDLED WITH
74
- 2.1.4
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ starcall (0.5.0)
5
+ httparty (~> 0.17)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.1)
11
+ coderay (1.1.3)
12
+ diff-lcs (1.3)
13
+ httparty (0.18.1)
14
+ mime-types (~> 3.0)
15
+ multi_xml (>= 0.5.2)
16
+ method_source (1.0.0)
17
+ mime-types (3.3.1)
18
+ mime-types-data (~> 3.2015)
19
+ mime-types-data (3.2020.0512)
20
+ multi_xml (0.6.0)
21
+ parallel (1.19.2)
22
+ parser (2.7.1.4)
23
+ ast (~> 2.4.1)
24
+ pry (0.13.1)
25
+ coderay (~> 1.1)
26
+ method_source (~> 1.0)
27
+ rainbow (3.0.0)
28
+ rake (12.3.3)
29
+ regexp_parser (1.7.1)
30
+ rexml (3.2.4)
31
+ rspec (3.9.0)
32
+ rspec-core (~> 3.9.0)
33
+ rspec-expectations (~> 3.9.0)
34
+ rspec-mocks (~> 3.9.0)
35
+ rspec-core (3.9.2)
36
+ rspec-support (~> 3.9.3)
37
+ rspec-expectations (3.9.2)
38
+ diff-lcs (>= 1.2.0, < 2.0)
39
+ rspec-support (~> 3.9.0)
40
+ rspec-mocks (3.9.1)
41
+ diff-lcs (>= 1.2.0, < 2.0)
42
+ rspec-support (~> 3.9.0)
43
+ rspec-support (3.9.3)
44
+ rubocop (0.86.0)
45
+ parallel (~> 1.10)
46
+ parser (>= 2.7.0.1)
47
+ rainbow (>= 2.2.2, < 4.0)
48
+ regexp_parser (>= 1.7)
49
+ rexml
50
+ rubocop-ast (>= 0.0.3, < 1.0)
51
+ ruby-progressbar (~> 1.7)
52
+ unicode-display_width (>= 1.4.0, < 2.0)
53
+ rubocop-ast (0.0.3)
54
+ parser (>= 2.7.0.1)
55
+ rubocop-rspec (1.40.0)
56
+ rubocop (>= 0.68.1)
57
+ ruby-progressbar (1.10.1)
58
+ unicode-display_width (1.7.0)
59
+
60
+ PLATFORMS
61
+ ruby
62
+ x64-mingw32
63
+
64
+ DEPENDENCIES
65
+ bundler (~> 2.0)
66
+ pry (~> 0.13)
67
+ rake (~> 12.3)
68
+ rspec (~> 3.0)
69
+ rubocop (~> 0.86)
70
+ rubocop-rspec (~> 1.40)
71
+ starcall!
72
+
73
+ BUNDLED WITH
74
+ 2.1.4
data/README.md CHANGED
@@ -247,6 +247,47 @@ Required fields:
247
247
  Optional fields:
248
248
  - None
249
249
 
250
+ ### SpectatorV4
251
+ #### `summoner_game_info`
252
+ [Riot API Documentation](https://developer.riotgames.com/apis#spectator-v4/GET_getCurrentGameInfoBySummoner)
253
+
254
+ Required fields:
255
+ - `encrypted_summoner_id` (The encrypted summoner ID for the summoner you want to know about.)
256
+ - `region` (The region that the summoner is in.)
257
+
258
+ Optional fields:
259
+ None
260
+
261
+ #### `featured_games`
262
+ [Riot API Documentation](https://developer.riotgames.com/apis#spectator-v4/GET_getFeaturedGames)
263
+
264
+ Required fields:
265
+ None
266
+
267
+ Optional fields:
268
+ - `region` (By default it will assume `euw`, if you want to know for a specific region, you can pass that in.)
269
+
270
+ ### Status V3
271
+ #### `status_data`
272
+ [Riot API Documentation](https://developer.riotgames.com/apis#lol-status-v3/GET_getShardData)
273
+
274
+ Required fields:
275
+ - None
276
+
277
+ Optional fields:
278
+ - `region` (By default it will assume `euw`, if you want to know for a specific region, you can pass that in.)
279
+
280
+ ### ThirdPartyCodeV4
281
+ #### `check_for_summoner`
282
+ [Riot API Documentation](https://developer.riotgames.com/apis#third-party-code-v4)
283
+
284
+ Required fields:
285
+ - `encrypted_summoner_id` (The encrypted summoner ID for the summoner you want to know about.)
286
+ - `region` (The region that the summoner is in.)
287
+
288
+ Optional fields:
289
+ None
290
+
250
291
  ## Development
251
292
 
252
293
  After checking out the repo, run `bundle install` to install dependencies.
@@ -4,3 +4,6 @@ require_relative 'champion_mastery_v4'
4
4
  require_relative 'champion_v3'
5
5
  require_relative 'clash_v1'
6
6
  require_relative 'summoner_v4'
7
+ require_relative 'status_v3'
8
+ require_relative 'spectator_v4'
9
+ require_relative 'third_party_code_v4'
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'starcall/helpers/region_parser'
4
+ require 'starcall/api_requests'
5
+
6
+ module Starcall
7
+ module Endpoints
8
+ # Methods for getting spectator information
9
+ class SpectatorV4
10
+ # Get current game information for the given summoner ID
11
+ def self.summoner_game_info(encrypted_summoner_id:, region:)
12
+ Starcall::Regions.valid?(region: region)
13
+ Starcall::ApiRequests.make_request(
14
+ url: "https://#{parse_region(region: region)}.api.riotgames.com"\
15
+ "/lol/spectator/v4/active-games/by-summoner/#{encrypted_summoner_id}"
16
+ )
17
+ end
18
+
19
+ # Get list of featured games
20
+ def self.featured_games(region: 'euw')
21
+ Starcall::Regions.valid?(region: region)
22
+ Starcall::ApiRequests.make_request(
23
+ url: "https://#{parse_region(region: region)}.api.riotgames.com"\
24
+ '/lol/spectator/v4/featured-games'
25
+ )
26
+ end
27
+
28
+ def self.parse_region(region:)
29
+ Starcall::Helpers::RegionParser.parse(region: region)
30
+ end
31
+
32
+ private_class_method :parse_region
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'starcall/helpers/region_parser'
4
+ require 'starcall/api_requests'
5
+
6
+ module Starcall
7
+ module Endpoints
8
+ # Method to check the status of services in a region
9
+ class StatusV3
10
+ # Get League of Legends status for the given shard
11
+ def self.status_data(region: 'euw')
12
+ Starcall::Regions.valid?(region: region)
13
+ Starcall::ApiRequests.make_request(
14
+ url: "https://#{parse_region(region: region)}.api.riotgames.com"\
15
+ '/lol/status/v3/shard-data'
16
+ )
17
+ end
18
+
19
+ def self.parse_region(region:)
20
+ Starcall::Helpers::RegionParser.parse(region: region)
21
+ end
22
+
23
+ private_class_method :parse_region
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'starcall/helpers/region_parser'
4
+ require 'starcall/api_requests'
5
+
6
+ module Starcall
7
+ module Endpoints
8
+ # Methods to check 3rd party codes
9
+ class ThirdPartyCodeV4
10
+ # Get third party code for a given summoner ID
11
+ def self.check_for_summoner(encrypted_summoner_id:, region:)
12
+ Starcall::Regions.valid?(region: region)
13
+ Starcall::ApiRequests.make_request(
14
+ url: "https://#{parse_region(region: region)}.api.riotgames.com"\
15
+ "/lol/platform/v4/third-party-code/by-summoner/#{encrypted_summoner_id}"
16
+ )
17
+ end
18
+
19
+ def self.parse_region(region:)
20
+ Starcall::Helpers::RegionParser.parse(region: region)
21
+ end
22
+
23
+ private_class_method :parse_region
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Starcall
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starcall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelvin Samuel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-29 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,7 +132,10 @@ files:
132
132
  - lib/starcall/endpoints/champion_v3.rb
133
133
  - lib/starcall/endpoints/clash_v1.rb
134
134
  - lib/starcall/endpoints/endpoints.rb
135
+ - lib/starcall/endpoints/spectator_v4.rb
136
+ - lib/starcall/endpoints/status_v3.rb
135
137
  - lib/starcall/endpoints/summoner_v4.rb
138
+ - lib/starcall/endpoints/third_party_code_v4.rb
136
139
  - lib/starcall/errors/errors.rb
137
140
  - lib/starcall/errors/invalid_language.rb
138
141
  - lib/starcall/errors/invalid_region.rb