blizzard_api 0.5.0 → 0.5.1

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: 79f0c2964787e385ec480a01f0286a455a5869b7d6d3e9d8f4f46b9ac0bd98b6
4
- data.tar.gz: c79b59fb2862b32e325240159a8d7dc08199c4f6f9fb3c060df4d73016de414d
3
+ metadata.gz: 81d6f1a66cf34191acfd15d00934934c29003a2f99367ccf7e9644382ebb89b9
4
+ data.tar.gz: 1d5a888c2b9505c501389a3e9bc718e6b88f643f23c52d6bceb36c61c8b13fe4
5
5
  SHA512:
6
- metadata.gz: a425ba4f7b554a3381f7fb588650ff4525320da241c5f10c21e472bd8ef982659929bce064eb19c107b0b7ccabd1702d215fbbb256024e2be2a0cad7913110d0
7
- data.tar.gz: b8d2b32b759989fd5f7d2a129b9cb2e6c5b23d06e1ea5bbaa9159a7c65bc1d771fbfd3fb782260950553d2c0feaaeca748567e0db4337357c9e9ac0135b7f8de
6
+ metadata.gz: fa2270714c47f2b5913f5a28b575e7a91e1b70c81ad34cb898fcb03d7c02e68c13ee02e3c4c95012ad6c7b1ac417fabd72c11072776ea28786319fc87089ff40
7
+ data.tar.gz: fd626a5eafa0630bc3003ace854f2adb65f383ac2e84f755f7325e670804aca1cfde9a82edea687ef99e06850a9e6c4b54d0462b45e265bc400c03d57b498e2a
@@ -1,5 +1,9 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.5.1**
4
+
5
+ Added new endpoints: https://us.forums.blizzard.com/en/blizzard/t/wow-game-data-api-modified-crafting-support/12727
6
+
3
7
  **Version 0.5.0**
4
8
 
5
9
  This version brings a lot of internal changes to the way the gem works. While
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blizzard_api (0.5.0)
4
+ blizzard_api (0.5.1)
5
5
  redis (~> 4.1, >= 4.1.0)
6
6
 
7
7
  GEM
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.5.0'
5
+ VERSION = '0.5.1'
6
6
  end
@@ -19,6 +19,7 @@ module BlizzardApi
19
19
  require_relative 'wow/game_data/item'
20
20
  require_relative 'wow/game_data/journal'
21
21
  require_relative 'wow/game_data/media'
22
+ require_relative 'wow/game_data/modified_crafting'
22
23
  require_relative 'wow/game_data/mount'
23
24
  require_relative 'wow/game_data/mythic_keystone_affix'
24
25
  require_relative 'wow/game_data/mythic_keystone'
@@ -104,6 +105,13 @@ module BlizzardApi
104
105
  BlizzardApi::Wow::Media.new(region)
105
106
  end
106
107
 
108
+ ##
109
+ # @param region [String] API Region
110
+ # @return {ModifiedCrafting}
111
+ def self.modified_crafting(region = BlizzardApi.region)
112
+ BlizzardApi::Wow::ModifiedCrafting.new(region)
113
+ end
114
+
107
115
  ##
108
116
  # @param region [String] API Region
109
117
  # @return {Mount}
@@ -0,0 +1,67 @@
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.modified_crafting
12
+ class ModifiedCrafting < Wow::GenericDataEndpoint
13
+ def complete
14
+ raise BlizzardApi::ApiException, 'This endpoint does not have a complete method.'
15
+ end
16
+
17
+ ##
18
+ # Fetch modified crafting category index
19
+ #
20
+ # @!macro request_options
21
+ def categories(options = {})
22
+ api_request "#{base_url(:game_data)}/modified-crafting/category/index", default_options.merge(options)
23
+ end
24
+
25
+ ##
26
+ # Fetch a modified crafting category
27
+ #
28
+ # @param id [Integer] Modified crafting category id
29
+ #
30
+ # @!macro request_options
31
+ #
32
+ # @!macro response
33
+ def category(id, options = {})
34
+ api_request "#{base_url(:game_data)}/modified-crafting/category/#{id}", default_options.merge(options)
35
+ end
36
+
37
+ ##
38
+ # Fetch modified crafting slot type index
39
+ #
40
+ # @!macro request_options
41
+ def slot_types(options = {})
42
+ api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/index", default_options.merge(options)
43
+ end
44
+
45
+ ##
46
+ # Fetch a modified crafting slot type
47
+ #
48
+ # @param id [Integer] Modified crafting slot type id
49
+ #
50
+ # @!macro request_options
51
+ #
52
+ # @!macro response
53
+ def slot_type(id, options = {})
54
+ api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/#{id}", default_options.merge(options)
55
+ end
56
+
57
+ protected
58
+
59
+ def endpoint_setup
60
+ @endpoint = 'modified-crafting'
61
+ @namespace = :static
62
+ @collection = 'professions'
63
+ @ttl = CACHE_TRIMESTER
64
+ end
65
+ end
66
+ end
67
+ end
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: 0.5.0
4
+ version: 0.5.1
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-09-27 00:00:00.000000000 Z
11
+ date: 2020-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -161,6 +161,7 @@ files:
161
161
  - lib/blizzard_api/wow/game_data/item.rb
162
162
  - lib/blizzard_api/wow/game_data/journal.rb
163
163
  - lib/blizzard_api/wow/game_data/media.rb
164
+ - lib/blizzard_api/wow/game_data/modified_crafting.rb
164
165
  - lib/blizzard_api/wow/game_data/mount.rb
165
166
  - lib/blizzard_api/wow/game_data/mythic_keystone.rb
166
167
  - lib/blizzard_api/wow/game_data/mythic_keystone_affix.rb