starcall 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: afe7b17e98b4f26c45a50c13d4631ddbaae2f6e8f5674ad3769e5a85cb35089e
4
- data.tar.gz: 216b511b0109f37211c59777012716cf76d3ecbf803dd38ec5387bd8646fc202
3
+ metadata.gz: 5afedf4820aea69aabd850808b837072b96111f507bf85ee1f4d711d39c7775c
4
+ data.tar.gz: 5499635281beae5367f63fd9c6157020173bc37d38978eb8625ae446b7207eac
5
5
  SHA512:
6
- metadata.gz: 9b023aaee23d61056c570301b95bc360cd68ff045afa2551b0386238b83cc0de4ba49427434f926dc1bb983ff25fb773b5a38e06420c3af3108ffd26a74e21aa
7
- data.tar.gz: 4ca4dc69588b7196d1ee04e77a684fc4f2b9ab1894277fb2953445baecdeea6ff13b88275c08b34fa887cedf74eb647c6c32c7153c91341a4b7de38938c4a636
6
+ metadata.gz: '08f52cd064cc8844934e1f3fe6e1e6ad82ee7fbb7da9ce3933b93f1d5c860c9a672efe03359056bd1b625aacee607c356e75a55b132cae1edd71562b4fa436fd'
7
+ data.tar.gz: 0f05e164821a7f9564e3402722d0124745aac4bf8bd374b343e0a4f25bb66f225319c1d8f7778f566735556f89ee6ab48e261f2eebc1da37ac033e7f50f7c63b
@@ -13,6 +13,20 @@ None
13
13
 
14
14
  ---
15
15
 
16
+ ## v0.4.0 - Amumu
17
+ ![Amumu](http://ddragon.leagueoflegends.com/cdn/10.12.1/img/champion/Amumu.png)
18
+
19
+ ### New features
20
+ - Added the champion endpoints.
21
+
22
+ ### Changes
23
+ None
24
+
25
+ ### Bug fixes
26
+ None
27
+
28
+ ---
29
+
16
30
  ## v0.3.0 - Alistar
17
31
  ![Alistar](http://ddragon.leagueoflegends.com/cdn/10.12.1/img/champion/Alistar.png)
18
32
 
@@ -25,7 +39,8 @@ None
25
39
  - Move `ApiRequests` under the `Starcall` namespace.
26
40
  - Move errors in to their own directory.
27
41
 
28
- ### Bug fixes
42
+ ### Bug fixes
43
+ None
29
44
 
30
45
  ---
31
46
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- starcall (0.3.0)
4
+ starcall (0.4.0)
5
5
  httparty (~> 0.17)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -129,7 +129,7 @@ It needs to be saved as an ENV var and called `RIOT_API_KEY`
129
129
 
130
130
  Required fields:
131
131
  - `encrypted_summoner_id` (The encrypted summoner ID for the summoner you want to know about.)
132
- - `region` (The reigion that the summoner is in.)
132
+ - `region` (The region that the summoner is in.)
133
133
 
134
134
  #### `summoner_on_champion`
135
135
  [Riot API Documentation](https://developer.riotgames.com/apis#champion-mastery-v4/GET_getChampionMastery)
@@ -137,14 +137,24 @@ Required fields:
137
137
  Required fields:
138
138
  - `encrypted_summoner_id` (The encrypted summoner ID for the summoner you want to know about.)
139
139
  - `champion_id` (The ID number of the champion that you want to know about.)
140
- - `region` (The reigion that the summoner is in.)
140
+ - `region` (The region that the summoner is in.)
141
141
 
142
142
  #### `summoner_total_mastery`
143
143
  [Riot API Documentation](https://developer.riotgames.com/apis#champion-mastery-v4/GET_getChampionMasteryScore)
144
144
 
145
145
  Required fields:
146
146
  - `encrypted_summoner_id` (the encrypted summoner ID for the summoner you want to know about.)
147
- - `region` (The reigion that the summoner is in.)
147
+ - `region` (The region that the summoner is in.)
148
+
149
+ ### Champion V3
150
+ #### `champion_rotations`
151
+ [Riot API Documentation](https://developer.riotgames.com/apis#champion-v3/GET_getChampionInfo)
152
+
153
+ Required fields:
154
+ - None
155
+
156
+ Optional fields:
157
+ - `region` (By default it will assume `euw`, if you want to know for a specific region, you can pass that in.)
148
158
 
149
159
 
150
160
  ## Development
@@ -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 used to call the Champion endpoints.
9
+ class ChampionV3
10
+ # Returns champion rotations, including free-to-play and low-level free-to-play rotations
11
+ def self.champion_rotations(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/platform/v3/champion-rotations'
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.3.0'
4
+ VERSION = '0.4.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.3.0
4
+ version: 0.4.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-06-30 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,6 +129,7 @@ files:
129
129
  - lib/starcall.rb
130
130
  - lib/starcall/api_requests.rb
131
131
  - lib/starcall/endpoints/champion_mastery_v4.rb
132
+ - lib/starcall/endpoints/champion_v3.rb
132
133
  - lib/starcall/endpoints/endpoints.rb
133
134
  - lib/starcall/errors/errors.rb
134
135
  - lib/starcall/errors/invalid_language.rb