blizzard_api 0.3.7 → 0.4.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/CHANGELOG.md +24 -0
- data/Gemfile.lock +7 -3
- data/README.md +40 -0
- data/blizzard_api.gemspec +2 -0
- data/lib/blizzard_api/diablo/community/item.rb +3 -4
- data/lib/blizzard_api/diablo/community/profile.rb +4 -4
- data/lib/blizzard_api/request.rb +2 -1
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow.rb +10 -0
- data/lib/blizzard_api/wow/game_data/connected_realm.rb +2 -0
- data/lib/blizzard_api/wow/game_data/generic_data_endpoint.rb +2 -2
- data/lib/blizzard_api/wow/game_data/profession.rb +72 -0
- data/lib/blizzard_api/wow/game_data/realm.rb +2 -0
- data/lib/blizzard_api/wow/profile/character_profile.rb +14 -0
- data/lib/blizzard_api/wow/search/search_composer.rb +97 -0
- data/lib/blizzard_api/wow/search/search_request.rb +24 -0
- metadata +39 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba9df0ce8e6bc1398057fa55eae73f4081d370f13d204f0d6f2eccb313f3bed2
|
4
|
+
data.tar.gz: 5f3d190b6d324c45b456ccd856b6271b6e2447816930b7e451aa7fa325c85d98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa67738363d505b469eeb89c5fcc140fe2bbd8834c3be1afd588ba1a7ae9ac79347409bfdecad97a7a24ea1c427b70a5b4f3812b8d838d11c5b41bb34916bc09
|
7
|
+
data.tar.gz: 6489a58fc1132f50ccd977f0ad4dff408997c9fff80be0d38b7e5d43602287c99490af2604b6bed7a913baa22ad701189fe9eb366a58b39b1266b57a275df73d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
Please view this file on the master branch, otherwise it may be outdated
|
2
2
|
|
3
|
+
**Version 0.4.0**
|
4
|
+
|
5
|
+
Added support to searchable endpoints
|
6
|
+
|
7
|
+
https://develop.battle.net/documentation/world-of-warcraft/guides/search
|
8
|
+
|
9
|
+
**Version 0.3.11**
|
10
|
+
|
11
|
+
Fixed D3 item URL.
|
12
|
+
|
13
|
+
**Version 0.3.10**
|
14
|
+
|
15
|
+
Really fixed D3 profile URLs this time.
|
16
|
+
|
17
|
+
**Version 0.3.9**
|
18
|
+
|
19
|
+
Fix D3 profile URLs.
|
20
|
+
|
21
|
+
**Version 0.3.8**
|
22
|
+
|
23
|
+
Added new profession endpoints.
|
24
|
+
|
25
|
+
https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-patch-notes-20200414/5680
|
26
|
+
|
3
27
|
**Version 0.3.7**
|
4
28
|
|
5
29
|
Automated test improvements
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
blizzard_api (0.
|
4
|
+
blizzard_api (0.4.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.0)
|
11
|
+
dotenv (2.7.5)
|
11
12
|
jaro_winkler (1.5.3)
|
12
13
|
minitest (5.11.3)
|
13
14
|
parallel (1.17.0)
|
@@ -15,7 +16,7 @@ GEM
|
|
15
16
|
ast (~> 2.4.0)
|
16
17
|
rainbow (3.0.0)
|
17
18
|
rake (13.0.1)
|
18
|
-
redis (4.1.
|
19
|
+
redis (4.1.4)
|
19
20
|
rubocop (0.74.0)
|
20
21
|
jaro_winkler (~> 1.5.1)
|
21
22
|
parallel (~> 1.10)
|
@@ -25,15 +26,18 @@ GEM
|
|
25
26
|
unicode-display_width (>= 1.4.0, < 1.7)
|
26
27
|
ruby-progressbar (1.10.1)
|
27
28
|
unicode-display_width (1.6.0)
|
29
|
+
yard (0.9.25)
|
28
30
|
|
29
31
|
PLATFORMS
|
30
32
|
ruby
|
31
33
|
|
32
34
|
DEPENDENCIES
|
33
35
|
blizzard_api!
|
36
|
+
dotenv
|
34
37
|
minitest (~> 5.0)
|
35
38
|
rake (~> 13.0)
|
36
39
|
rubocop (~> 0.61)
|
40
|
+
yard
|
37
41
|
|
38
42
|
BUNDLED WITH
|
39
|
-
2.1.
|
43
|
+
2.1.4
|
data/README.md
CHANGED
@@ -73,6 +73,46 @@ Most **data** endpoints will have always 3 methods available `index`, `get` and
|
|
73
73
|
* `get` is used to get all information about a entry of the index returned data. It receives an id or slug as the first parameter, that depends on the endpoint.
|
74
74
|
* `complete` is a complete information of all items listed in index. **This may perform various calls to the blizzard api** only use if you really need all information.
|
75
75
|
|
76
|
+
### 3.1 Searchable endpoints
|
77
|
+
|
78
|
+
Some endpoints support search filters. To perform a search you can use the following formats:
|
79
|
+
|
80
|
+
|
81
|
+
To use the **or** operator you may pass an array of values as argument to `where` or `where_not` methods.
|
82
|
+
```ruby
|
83
|
+
realm = BlizzardApi::Wow.realm
|
84
|
+
realm_data = realm.search(1, 100) do |options|
|
85
|
+
options.where 'name.en_US', %w[Azralon Nemesis]
|
86
|
+
end
|
87
|
+
```
|
88
|
+
|
89
|
+
To use the **and** operator you may call `where` or `where_not` multiple times methods.
|
90
|
+
```ruby
|
91
|
+
realm = BlizzardApi::Wow.realm
|
92
|
+
realm_data = realm.search(1, 100) do |options|
|
93
|
+
options.where 'name.en_US', 'Azralon'
|
94
|
+
options.where 'id', 3209
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
To use the **range** operator you may pass a hash to `where` or `where_not`.
|
99
|
+
```ruby
|
100
|
+
realm = BlizzardApi::Wow.realm
|
101
|
+
realm_data = realm.search(1, 100) do |options|
|
102
|
+
options.where 'id', min: 3209, max: 4000, mode: :exclusive
|
103
|
+
end
|
104
|
+
```
|
105
|
+
*Note*: If you don't pass the `mode` key as `:exclusive` it will be `:inclusive` by default.
|
106
|
+
|
107
|
+
To **sort** fields you may call the `order_by` method multiple times:
|
108
|
+
```ruby
|
109
|
+
realm = BlizzardApi::Wow.realm
|
110
|
+
realm_data = realm.search(1, 100) do |options|
|
111
|
+
options.where 'id', min: 3209, max: 4000, mode: :exclusive
|
112
|
+
options.order_by 'id', :desc
|
113
|
+
end
|
114
|
+
```
|
115
|
+
|
76
116
|
## 4. Available endpoints
|
77
117
|
|
78
118
|
**Hint**: All methods support an additional optional hash parameter that allows you to override the following configurations for a single call:
|
data/blizzard_api.gemspec
CHANGED
@@ -34,7 +34,9 @@ Gem::Specification.new do |spec|
|
|
34
34
|
|
35
35
|
spec.add_runtime_dependency 'redis', '~> 4.1', '>= 4.1.0'
|
36
36
|
|
37
|
+
spec.add_development_dependency 'dotenv'
|
37
38
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
38
39
|
spec.add_development_dependency 'rake', '~> 13.0'
|
39
40
|
spec.add_development_dependency 'rubocop', '~> 0.61'
|
41
|
+
spec.add_development_dependency 'yard'
|
40
42
|
end
|
@@ -13,13 +13,12 @@ module BlizzardApi
|
|
13
13
|
##
|
14
14
|
# Return information about an item
|
15
15
|
#
|
16
|
-
# @param
|
17
|
-
# @param item_id [Integer] Item id
|
16
|
+
# @param item_slug_and_id [String] Item slug
|
18
17
|
# @!macro request_options
|
19
18
|
#
|
20
19
|
# @!macro response
|
21
|
-
def get(
|
22
|
-
api_request "#{base_url(:community)}/data/item/#{
|
20
|
+
def get(item_slug_and_id, options = {})
|
21
|
+
api_request "#{base_url(:community)}/data/item/#{item_slug_and_id}", { ttl: CACHE_TRIMESTER }.merge(options)
|
23
22
|
end
|
24
23
|
end
|
25
24
|
end
|
@@ -22,7 +22,7 @@ module BlizzardApi
|
|
22
22
|
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
|
23
23
|
def index(battletag, oauth_token, options = {})
|
24
24
|
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
|
25
|
-
api_request "#{base_url(:community)}/
|
25
|
+
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/", opts
|
26
26
|
end
|
27
27
|
|
28
28
|
##
|
@@ -38,7 +38,7 @@ module BlizzardApi
|
|
38
38
|
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
|
39
39
|
def hero(battletag, oauth_token, hero_id, options = {})
|
40
40
|
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
|
41
|
-
api_request "#{base_url(:community)}/
|
41
|
+
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}", opts
|
42
42
|
end
|
43
43
|
|
44
44
|
##
|
@@ -54,7 +54,7 @@ module BlizzardApi
|
|
54
54
|
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
|
55
55
|
def hero_items(battletag, oauth_token, hero_id, options = {})
|
56
56
|
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
|
57
|
-
api_request "#{base_url(:community)}/
|
57
|
+
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/items", opts
|
58
58
|
end
|
59
59
|
|
60
60
|
##
|
@@ -70,7 +70,7 @@ module BlizzardApi
|
|
70
70
|
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
|
71
71
|
def hero_follower_items(battletag, oauth_token, hero_id, options = {})
|
72
72
|
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
|
73
|
-
api_request "#{base_url(:community)}/
|
73
|
+
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/follower-items", opts
|
74
74
|
end
|
75
75
|
|
76
76
|
private
|
data/lib/blizzard_api/request.rb
CHANGED
@@ -50,7 +50,8 @@ module BlizzardApi
|
|
50
50
|
community: 'https://%s.api.blizzard.com/%s',
|
51
51
|
profile: 'https://%s.api.blizzard.com/profile/%s',
|
52
52
|
media: 'https://%s.api.blizzard.com/data/%s/media',
|
53
|
-
user_profile: 'https://%s.api.blizzard.com/profile/user/%s'
|
53
|
+
user_profile: 'https://%s.api.blizzard.com/profile/user/%s',
|
54
|
+
search: 'https://%s.api.blizzard.com/data/%s/search'
|
54
55
|
}.freeze
|
55
56
|
|
56
57
|
##
|
data/lib/blizzard_api/version.rb
CHANGED
data/lib/blizzard_api/wow.rb
CHANGED
@@ -5,6 +5,8 @@ module BlizzardApi
|
|
5
5
|
module Wow
|
6
6
|
require_relative 'wow/request'
|
7
7
|
require_relative 'wow/game_data/generic_data_endpoint'
|
8
|
+
require_relative 'wow/search/search_composer'
|
9
|
+
require_relative 'wow/search/search_request'
|
8
10
|
|
9
11
|
# WoW data api
|
10
12
|
require_relative 'wow/game_data/achievement'
|
@@ -25,6 +27,7 @@ module BlizzardApi
|
|
25
27
|
require_relative 'wow/game_data/playable_race'
|
26
28
|
require_relative 'wow/game_data/playable_specialization'
|
27
29
|
require_relative 'wow/game_data/power_type'
|
30
|
+
require_relative 'wow/game_data/profession'
|
28
31
|
require_relative 'wow/game_data/pvp_season'
|
29
32
|
require_relative 'wow/game_data/pvp_tier'
|
30
33
|
require_relative 'wow/game_data/quest'
|
@@ -162,6 +165,13 @@ module BlizzardApi
|
|
162
165
|
BlizzardApi::Wow::PowerType.new(region)
|
163
166
|
end
|
164
167
|
|
168
|
+
##
|
169
|
+
# @param region [String] API Region
|
170
|
+
# @return {Profession}
|
171
|
+
def self.profession(region = BlizzardApi.region)
|
172
|
+
BlizzardApi::Wow::Profession.new(region)
|
173
|
+
end
|
174
|
+
|
165
175
|
##
|
166
176
|
# @param region [String] API Region
|
167
177
|
# @return {PvpSeason}
|
@@ -10,6 +10,8 @@ module BlizzardApi
|
|
10
10
|
# You can get an instance of this class using the default region as follows:
|
11
11
|
# api_instance = BlizzardApi::Wow.connected_realm
|
12
12
|
class ConnectedRealm < Wow::GenericDataEndpoint
|
13
|
+
include BlizzardApi::Wow::Searchable
|
14
|
+
|
13
15
|
protected
|
14
16
|
|
15
17
|
def endpoint_setup
|
@@ -48,9 +48,9 @@ module BlizzardApi
|
|
48
48
|
|
49
49
|
protected
|
50
50
|
|
51
|
-
def endpoint_uri(variant = nil)
|
51
|
+
def endpoint_uri(variant = nil, scope = :game_data)
|
52
52
|
endpoint = variant ? "#{@endpoint}-#{variant}" : @endpoint
|
53
|
-
"#{base_url(
|
53
|
+
"#{base_url(scope)}/#{endpoint}"
|
54
54
|
end
|
55
55
|
|
56
56
|
def endpoint_setup
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module Wow
|
5
|
+
##
|
6
|
+
# This class allows access to World of Warcraft professions
|
7
|
+
#
|
8
|
+
# @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api
|
9
|
+
#
|
10
|
+
# You can get an instance of this class using the default region as follows:
|
11
|
+
# api_instance = BlizzardApi::Wow.profession
|
12
|
+
class Profession < Wow::GenericDataEndpoint
|
13
|
+
##
|
14
|
+
# Fetch media for a profession using its *id*
|
15
|
+
#
|
16
|
+
# @param id [Integer] Profession id
|
17
|
+
#
|
18
|
+
# @!macro request_options
|
19
|
+
#
|
20
|
+
# @!macro response
|
21
|
+
def media(id, options = {})
|
22
|
+
api_request "#{base_url(:media)}/profession/#{id}", default_options.merge(options)
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Fetch skill tier for a profession using its *ids*
|
27
|
+
#
|
28
|
+
# @param id [Integer] Profession id
|
29
|
+
# @param tier_id [Integer] Profession skill tier id
|
30
|
+
#
|
31
|
+
# @!macro request_options
|
32
|
+
#
|
33
|
+
# @!macro response
|
34
|
+
def skill_tier(id, tier_id, options = {})
|
35
|
+
api_request "#{base_url(:game_data)}/profession/#{id}/skill-tier/#{tier_id}", default_options.merge(options)
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# Fetch data for a recipe using its *ids*
|
40
|
+
#
|
41
|
+
# @param id [Integer] Recipe id
|
42
|
+
#
|
43
|
+
# @!macro request_options
|
44
|
+
#
|
45
|
+
# @!macro response
|
46
|
+
def recipe(id, options = {})
|
47
|
+
api_request "#{base_url(:game_data)}/recipe/#{id}", default_options.merge(options)
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Fetch media for a recipe using its *ids*
|
52
|
+
#
|
53
|
+
# @param id [Integer] Recipe id
|
54
|
+
#
|
55
|
+
# @!macro request_options
|
56
|
+
#
|
57
|
+
# @!macro response
|
58
|
+
def recipe_media(id, options = {})
|
59
|
+
api_request "#{base_url(:media)}/recipe/#{id}", default_options.merge(options)
|
60
|
+
end
|
61
|
+
|
62
|
+
protected
|
63
|
+
|
64
|
+
def endpoint_setup
|
65
|
+
@endpoint = 'profession'
|
66
|
+
@namespace = :static
|
67
|
+
@collection = 'professions'
|
68
|
+
@ttl = CACHE_TRIMESTER
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -10,6 +10,8 @@ module BlizzardApi
|
|
10
10
|
# You can get an instance of this class using the default region as follows:
|
11
11
|
# api_instance = BlizzardApi::Wow.realm
|
12
12
|
class Realm < Wow::GenericDataEndpoint
|
13
|
+
include BlizzardApi::Wow::Searchable
|
14
|
+
|
13
15
|
protected
|
14
16
|
|
15
17
|
def endpoint_setup
|
@@ -221,6 +221,20 @@ module BlizzardApi
|
|
221
221
|
character_request realm, character, options, "mythic-keystone-profile/season/#{season}"
|
222
222
|
end
|
223
223
|
|
224
|
+
##
|
225
|
+
# Return professions from a character
|
226
|
+
#
|
227
|
+
# @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
|
228
|
+
#
|
229
|
+
# @param realm [String] The character realm's slug
|
230
|
+
# @param character [String] The character name
|
231
|
+
# @!macro request_options
|
232
|
+
#
|
233
|
+
# @!macro response
|
234
|
+
def professions(realm, character, options = {})
|
235
|
+
character_request realm, character, options, 'professions'
|
236
|
+
end
|
237
|
+
|
224
238
|
##
|
225
239
|
# Return character status
|
226
240
|
#
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module Wow
|
5
|
+
##
|
6
|
+
# Composer for search endpoint arguments
|
7
|
+
class SearchComposer
|
8
|
+
attr_accessor :fields, :order, :page, :page_size
|
9
|
+
|
10
|
+
def initialize(page, page_size)
|
11
|
+
self.page = page
|
12
|
+
self.page_size = page_size
|
13
|
+
self.fields = []
|
14
|
+
self.order = []
|
15
|
+
end
|
16
|
+
|
17
|
+
##
|
18
|
+
# Add a search field
|
19
|
+
#
|
20
|
+
# The second argument takes a simple value, an array of values or a hash for range searches.
|
21
|
+
#
|
22
|
+
# @param field [String] Field name
|
23
|
+
# @param value [String|Integer|Hash|Array<Integer|String>]
|
24
|
+
# @option value [Integer] :min Range start
|
25
|
+
# @option value [Integer] :max Range end
|
26
|
+
# @option value [Integer] :mode Range mode (:inclusive|:exclusive)
|
27
|
+
#
|
28
|
+
# @return {SearchComposer}
|
29
|
+
def where(field, value)
|
30
|
+
fields.push "#{field}=#{resolve_value(value)}"
|
31
|
+
self
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Add a search field
|
36
|
+
#
|
37
|
+
# The second argument takes a simple value, an array of values or a hash for range searches.
|
38
|
+
#
|
39
|
+
# @param field [String] Field name
|
40
|
+
# @param value [String|Integer|Hash|Array<Integer|String>]
|
41
|
+
# @option value [Integer] :min Range start
|
42
|
+
# @option value [Integer] :max Range end
|
43
|
+
# @option value [Integer] :mode Range mode (:inclusive|:exclusive)
|
44
|
+
#
|
45
|
+
# @return {SearchComposer}
|
46
|
+
def where_not(field, value)
|
47
|
+
fields.push "#{field}!=#{resolve_value(value)}"
|
48
|
+
self
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Add a sort field
|
53
|
+
#
|
54
|
+
# @param field [String] Field name
|
55
|
+
# @param mode [Symbol] :asc or :desc
|
56
|
+
#
|
57
|
+
# @return {SearchComposer}
|
58
|
+
def order_by(field, mode = :asc)
|
59
|
+
raise ArgumentError, 'Invalid order mode.' unless %i[asc desc].include? mode
|
60
|
+
|
61
|
+
order.push "#{field}:#{mode}"
|
62
|
+
self
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Returns a valid queryString based on the options
|
67
|
+
#
|
68
|
+
# @return {String}
|
69
|
+
def to_search_query
|
70
|
+
query_string = "_page=#{page}&_pageSize=#{page_size}"
|
71
|
+
query_string += '&' + fields.join('&') unless fields.size.zero?
|
72
|
+
query_string += "&orderby=#{order.join(',')}" unless order.size.zero?
|
73
|
+
query_string
|
74
|
+
end
|
75
|
+
|
76
|
+
protected
|
77
|
+
|
78
|
+
def resolve_value(value)
|
79
|
+
return value.join '||' if value.is_a? Array
|
80
|
+
|
81
|
+
return value.to_s unless value.is_a? Hash
|
82
|
+
|
83
|
+
resolve_hash value
|
84
|
+
end
|
85
|
+
|
86
|
+
def resolve_hash(value)
|
87
|
+
min = value.key?(:min) ? value[:min] : ''
|
88
|
+
max = value.key?(:max) ? value[:max] : ''
|
89
|
+
mode = value.key?(:mode) ? value[:mode] : :inclusive
|
90
|
+
|
91
|
+
return "[#{min},#{max}]" if mode.eql? :inclusive
|
92
|
+
|
93
|
+
"(#{min},#{max})"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module Wow
|
5
|
+
##
|
6
|
+
# Added search support to an endpoint
|
7
|
+
module Searchable
|
8
|
+
##
|
9
|
+
# Fetch data base on search criteria
|
10
|
+
#
|
11
|
+
# @param page [Integer] Page o return
|
12
|
+
# @param page_size [Integer] Amount of items per page
|
13
|
+
#
|
14
|
+
# @!macro request_options
|
15
|
+
# @!macro response
|
16
|
+
def search(page = 1, page_size = 100, options = {})
|
17
|
+
search_options = SearchComposer.new(page, page_size)
|
18
|
+
yield search_options if block_given?
|
19
|
+
|
20
|
+
api_request "#{endpoint_uri(nil, :search)}?#{search_options.to_search_query}", default_options.merge(options)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,35 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blizzard_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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: 2020-
|
11
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.0
|
20
17
|
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '4.1'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.1.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.1'
|
27
30
|
- - ">="
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: 4.1.0
|
30
|
-
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: dotenv
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
31
38
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
39
|
+
version: '0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: minitest
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,6 +86,20 @@ dependencies:
|
|
72
86
|
- - "~>"
|
73
87
|
- !ruby/object:Gem::Version
|
74
88
|
version: '0.61'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: yard
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
75
103
|
description: This is a simple interface to obtain data from Blizzard API
|
76
104
|
email:
|
77
105
|
- francis.schiavo@francisschiavo.com
|
@@ -142,6 +170,7 @@ files:
|
|
142
170
|
- lib/blizzard_api/wow/game_data/playable_race.rb
|
143
171
|
- lib/blizzard_api/wow/game_data/playable_specialization.rb
|
144
172
|
- lib/blizzard_api/wow/game_data/power_type.rb
|
173
|
+
- lib/blizzard_api/wow/game_data/profession.rb
|
145
174
|
- lib/blizzard_api/wow/game_data/pvp_season.rb
|
146
175
|
- lib/blizzard_api/wow/game_data/pvp_tier.rb
|
147
176
|
- lib/blizzard_api/wow/game_data/quest.rb
|
@@ -156,6 +185,8 @@ files:
|
|
156
185
|
- lib/blizzard_api/wow/profile/guild.rb
|
157
186
|
- lib/blizzard_api/wow/profile/profile.rb
|
158
187
|
- lib/blizzard_api/wow/request.rb
|
188
|
+
- lib/blizzard_api/wow/search/search_composer.rb
|
189
|
+
- lib/blizzard_api/wow/search/search_request.rb
|
159
190
|
homepage: https://gitlab.com/francisschiavo/blizzard_api
|
160
191
|
licenses:
|
161
192
|
- MIT
|
@@ -178,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
209
|
- !ruby/object:Gem::Version
|
179
210
|
version: '0'
|
180
211
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.1.2
|
182
213
|
signing_key:
|
183
214
|
specification_version: 4
|
184
215
|
summary: Unofficial Ruby client for Blizzard Entertainment API
|