blizzard_api 3.2.0 → 3.3.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 +4 -4
- data/.github/workflows/ruby.yml +2 -2
- data/Gemfile.lock +11 -11
- data/lib/blizzard_api/overwatch_league/community/matches.rb +22 -0
- data/lib/blizzard_api/overwatch_league/community/players.rb +22 -0
- data/lib/blizzard_api/overwatch_league/community/segments.rb +22 -0
- data/lib/blizzard_api/overwatch_league/community/summary.rb +22 -0
- data/lib/blizzard_api/overwatch_league/community/teams.rb +22 -0
- data/lib/blizzard_api/overwatch_league/request.rb +15 -0
- data/lib/blizzard_api/overwatch_league.rb +50 -0
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow/game_data/talent.rb +25 -1
- data/lib/blizzard_api.rb +1 -0
- metadata +10 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20cf33fde29710b0f5c1c24e5e2c7001c42a25997175def8f3e02ed7742a4b62
|
4
|
+
data.tar.gz: f95f37b65054229c5fa4091a53cbbd31c20a4901282c78e4b37e07dd24636b69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9cea099795510ba35524d15a4a77af940ba8bce410646f23b4ead61ba423b6c5567ad0804c3115fa523dc85da33d2643d87e980e4a4b4b59768c8ea45c91cc2
|
7
|
+
data.tar.gz: 68a150c0d4c39e86654087e6609e20809cb5971b0cdc2f26c9553ddb7089bb61ad30b33ce3661651cb7887e8d44c5445c75a0b0df3e277dc9ed74542d7626b6c
|
data/.github/workflows/ruby.yml
CHANGED
@@ -8,9 +8,9 @@ jobs:
|
|
8
8
|
steps:
|
9
9
|
- uses: actions/checkout@v2
|
10
10
|
- name: Set up Ruby
|
11
|
-
uses: ruby/setup-ruby@
|
11
|
+
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
12
12
|
with:
|
13
|
-
ruby-version: 3.
|
13
|
+
ruby-version: 3.1
|
14
14
|
- name: Install dependencies
|
15
15
|
run: bundle install
|
16
16
|
- name: Run tests
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
blizzard_api (3.
|
4
|
+
blizzard_api (3.3.0)
|
5
5
|
redis (~> 4.1, >= 4.1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
|
-
dotenv (2.
|
12
|
-
minitest (5.
|
13
|
-
parallel (1.
|
14
|
-
parser (3.
|
11
|
+
dotenv (2.8.1)
|
12
|
+
minitest (5.16.3)
|
13
|
+
parallel (1.22.1)
|
14
|
+
parser (3.1.3.0)
|
15
15
|
ast (~> 2.4.1)
|
16
|
-
rainbow (3.
|
16
|
+
rainbow (3.1.1)
|
17
17
|
rake (13.0.6)
|
18
|
-
redis (4.
|
19
|
-
regexp_parser (2.
|
18
|
+
redis (4.8.0)
|
19
|
+
regexp_parser (2.6.1)
|
20
20
|
rexml (3.2.5)
|
21
21
|
rubocop (0.93.1)
|
22
22
|
parallel (~> 1.10)
|
@@ -27,12 +27,12 @@ GEM
|
|
27
27
|
rubocop-ast (>= 0.6.0)
|
28
28
|
ruby-progressbar (~> 1.7)
|
29
29
|
unicode-display_width (>= 1.4.0, < 2.0)
|
30
|
-
rubocop-ast (1.
|
31
|
-
parser (>= 3.
|
30
|
+
rubocop-ast (1.24.0)
|
31
|
+
parser (>= 3.1.1.0)
|
32
32
|
ruby-progressbar (1.11.0)
|
33
33
|
unicode-display_width (1.8.0)
|
34
34
|
webrick (1.7.0)
|
35
|
-
yard (0.9.
|
35
|
+
yard (0.9.28)
|
36
36
|
webrick (~> 1.7.0)
|
37
37
|
|
38
38
|
PLATFORMS
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
##
|
6
|
+
# This class allows access to OWL2 match data
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/owl/community-apis
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::OverwatchLeague.matches
|
12
|
+
class Matches < OverwatchLeague::Request
|
13
|
+
##
|
14
|
+
# Returns match information
|
15
|
+
#
|
16
|
+
# @!macro request_options
|
17
|
+
def get(match_id, **options)
|
18
|
+
api_request "#{base_url(:community)}/v1/matches/#{match_id}", **{ ttl: CACHE_DAY }.merge(options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
##
|
6
|
+
# This class allows access to OWL2 player data
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/owl/community-apis
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::OverwatchLeague.players
|
12
|
+
class Players < OverwatchLeague::Request
|
13
|
+
##
|
14
|
+
# Returns player information
|
15
|
+
#
|
16
|
+
# @!macro request_options
|
17
|
+
def get(player_id, **options)
|
18
|
+
api_request "#{base_url(:community)}/v1/players/#{player_id}", **{ ttl: CACHE_DAY }.merge(options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
##
|
6
|
+
# This class allows access to OWL2 segment data
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/owl/community-apis
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::OverwatchLeague.segments
|
12
|
+
class Segments < OverwatchLeague::Request
|
13
|
+
##
|
14
|
+
# Returns segment information
|
15
|
+
#
|
16
|
+
# @!macro request_options
|
17
|
+
def get(segment_id, **options)
|
18
|
+
api_request "#{base_url(:community)}/v1/segments/#{segment_id}", **{ ttl: CACHE_DAY }.merge(options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
##
|
6
|
+
# This class allows access to OWL2 summary data
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/owl/community-apis
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::OverwatchLeague.summary
|
12
|
+
class Summary < OverwatchLeague::Request
|
13
|
+
##
|
14
|
+
# Returns summary information
|
15
|
+
#
|
16
|
+
# @!macro request_options
|
17
|
+
def get(**options)
|
18
|
+
api_request "#{base_url(:community)}/v1/owl2", **{ ttl: CACHE_DAY }.merge(options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
##
|
6
|
+
# This class allows access to OWL2 team data
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/owl/community-apis
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::OverwatchLeague.teams
|
12
|
+
class Teams < OverwatchLeague::Request
|
13
|
+
##
|
14
|
+
# Returns team information
|
15
|
+
#
|
16
|
+
# @!macro request_options
|
17
|
+
def get(team_id, **options)
|
18
|
+
api_request "#{base_url(:community)}/v1/teams/#{team_id}", **{ ttl: CACHE_DAY }.merge(options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module OverwatchLeague
|
5
|
+
# Overwatch League requests
|
6
|
+
class Request < BlizzardApi::Request
|
7
|
+
##
|
8
|
+
# @!macro init_options
|
9
|
+
def initialize(**options)
|
10
|
+
super(**options)
|
11
|
+
@game = 'owl'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
# Overwatch League related classes
|
5
|
+
module OverwatchLeague
|
6
|
+
require_relative 'overwatch_league/request'
|
7
|
+
|
8
|
+
# Overwatch League community api
|
9
|
+
require_relative 'overwatch_league/community/summary'
|
10
|
+
require_relative 'overwatch_league/community/players'
|
11
|
+
require_relative 'overwatch_league/community/matches'
|
12
|
+
require_relative 'overwatch_league/community/segments'
|
13
|
+
require_relative 'overwatch_league/community/teams'
|
14
|
+
|
15
|
+
##
|
16
|
+
# @!macro init_options
|
17
|
+
# @return {Summary}
|
18
|
+
def self.summary(**options)
|
19
|
+
BlizzardApi::OverwatchLeague::Summary.new(**options)
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# @!macro init_options
|
24
|
+
# @return {Players}
|
25
|
+
def self.players(**options)
|
26
|
+
BlizzardApi::OverwatchLeague::Players.new(**options)
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# @!macro init_options
|
31
|
+
# @return {Matches}
|
32
|
+
def self.matches(**options)
|
33
|
+
BlizzardApi::OverwatchLeague::Matches.new(**options)
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# @!macro init_options
|
38
|
+
# @return {Segments}
|
39
|
+
def self.segments(**options)
|
40
|
+
BlizzardApi::OverwatchLeague::Segments.new(**options)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# @!macro init_options
|
45
|
+
# @return {Teams}
|
46
|
+
def self.teams(**options)
|
47
|
+
BlizzardApi::OverwatchLeague::Teams.new(**options)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/lib/blizzard_api/version.rb
CHANGED
@@ -12,6 +12,30 @@ module BlizzardApi
|
|
12
12
|
class Talent < Wow::GenericDataEndpoint
|
13
13
|
setup 'talent', :static, CACHE_TRIMESTER
|
14
14
|
|
15
|
+
##
|
16
|
+
# Fetch talent trees
|
17
|
+
#
|
18
|
+
# @!macro request_options
|
19
|
+
#
|
20
|
+
# @!macro response
|
21
|
+
def talent_trees(**options)
|
22
|
+
api_request "#{base_url(:game_data)}/talent-tree/index", **default_options.merge(options)
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Fetch a talent tree
|
27
|
+
#
|
28
|
+
# @param talent_tree_id [Integer] talent tree id
|
29
|
+
#
|
30
|
+
# @param spec_id [Integer] playable specialization id
|
31
|
+
#
|
32
|
+
# @!macro request_options
|
33
|
+
#
|
34
|
+
# @!macro response
|
35
|
+
def talent_tree(talent_tree_id, spec_id, **options)
|
36
|
+
api_request "#{base_url(:game_data)}/talent-tree/#{talent_tree_id}/playable-specialization/#{spec_id}", **default_options.merge(options)
|
37
|
+
end
|
38
|
+
|
15
39
|
##
|
16
40
|
# Fetch pvp talents
|
17
41
|
#
|
@@ -23,7 +47,7 @@ module BlizzardApi
|
|
23
47
|
end
|
24
48
|
|
25
49
|
##
|
26
|
-
# Fetch pvp
|
50
|
+
# Fetch a pvp talent
|
27
51
|
#
|
28
52
|
# @param id [Integer] Pvp talent id
|
29
53
|
#
|
data/lib/blizzard_api.rb
CHANGED
@@ -11,6 +11,7 @@ require_relative 'blizzard_api/wow'
|
|
11
11
|
require_relative 'blizzard_api/diablo'
|
12
12
|
require_relative 'blizzard_api/hearthstone'
|
13
13
|
require_relative 'blizzard_api/starcraft'
|
14
|
+
require_relative 'blizzard_api/overwatch_league'
|
14
15
|
|
15
16
|
# Blizzard namespace
|
16
17
|
module BlizzardApi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blizzard_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Schiavo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -144,6 +144,13 @@ files:
|
|
144
144
|
- lib/blizzard_api/hearthstone/game_data/generic_data_endpoint.rb
|
145
145
|
- lib/blizzard_api/hearthstone/game_data/metadata.rb
|
146
146
|
- lib/blizzard_api/hearthstone/request.rb
|
147
|
+
- lib/blizzard_api/overwatch_league.rb
|
148
|
+
- lib/blizzard_api/overwatch_league/community/matches.rb
|
149
|
+
- lib/blizzard_api/overwatch_league/community/players.rb
|
150
|
+
- lib/blizzard_api/overwatch_league/community/segments.rb
|
151
|
+
- lib/blizzard_api/overwatch_league/community/summary.rb
|
152
|
+
- lib/blizzard_api/overwatch_league/community/teams.rb
|
153
|
+
- lib/blizzard_api/overwatch_league/request.rb
|
147
154
|
- lib/blizzard_api/request.rb
|
148
155
|
- lib/blizzard_api/starcraft.rb
|
149
156
|
- lib/blizzard_api/starcraft/community/account.rb
|
@@ -221,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
228
|
- !ruby/object:Gem::Version
|
222
229
|
version: '0'
|
223
230
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
231
|
+
rubygems_version: 3.3.7
|
225
232
|
signing_key:
|
226
233
|
specification_version: 4
|
227
234
|
summary: Unofficial Ruby client for Blizzard Entertainment API
|