blizzard_api 0.4.0 → 0.4.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: ba9df0ce8e6bc1398057fa55eae73f4081d370f13d204f0d6f2eccb313f3bed2
4
- data.tar.gz: 5f3d190b6d324c45b456ccd856b6271b6e2447816930b7e451aa7fa325c85d98
3
+ metadata.gz: 242a293ba7b8ca3247dc92e4d4499049f4e81fc5ee425035148ad45d45717076
4
+ data.tar.gz: 0b4035e8c611f321a516182ec8f95ec88da575a408b43624ffa8ce4d7e1c7a37
5
5
  SHA512:
6
- metadata.gz: aa67738363d505b469eeb89c5fcc140fe2bbd8834c3be1afd588ba1a7ae9ac79347409bfdecad97a7a24ea1c427b70a5b4f3812b8d838d11c5b41bb34916bc09
7
- data.tar.gz: 6489a58fc1132f50ccd977f0ad4dff408997c9fff80be0d38b7e5d43602287c99490af2604b6bed7a913baa22ad701189fe9eb366a58b39b1266b57a275df73d
6
+ metadata.gz: f8ffab41d1106b9ae14cab5ca48bd369cd301ad7c833d878d841f96ab5c30fdb6944ed1e52b757e52cb519361e3c1317c798202d8e6333c215013d2b35304a57
7
+ data.tar.gz: 3a06b3833836360e72578224e53cc1b1cccb8c70bc310958b0ffe3f02a0cbbbf6ad6e545ad6413a5f7b067edf0f70f783b252b97bcfbf71a19eaec1a66ebbaa9
@@ -1,5 +1,9 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.4.1**
4
+
5
+ Added new retail and classic endpoints described here: https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-patch-notes-20200609/8902
6
+
3
7
  **Version 0.4.0**
4
8
 
5
9
  Added support to searchable endpoints
@@ -88,7 +88,7 @@ module BlizzardApi
88
88
  def endpoint_namespace(options)
89
89
  case options[:namespace]
90
90
  when :dynamic
91
- "dynamic-#{region}"
91
+ options.include?(:classic) ? "dynamic-classic-#{region}" : "dynamic-#{region}"
92
92
  when :static
93
93
  options.include?(:classic) ? "static-classic-#{region}" : "static-#{region}"
94
94
  when :profile
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
@@ -10,6 +10,52 @@ module BlizzardApi
10
10
  # You can get an instance of this class using the default region as follows:
11
11
  # api_instance = BlizzardApi::Wow.pet
12
12
  class Pet < Wow::GenericDataEndpoint
13
+ ##
14
+ # Fetch media for one of the pets listed by the {#index} using its *id*
15
+ #
16
+ # @param id [Integer] Pet id
17
+ #
18
+ # @!macro request_options
19
+ #
20
+ # @!macro response
21
+ def media(id, options = {})
22
+ api_request "#{base_url(:media)}/pet/#{id}", default_options.merge(options)
23
+ end
24
+
25
+ ##
26
+ # Fetch all pet abilities
27
+ #
28
+ # @!macro request_options
29
+ #
30
+ # @!macro response
31
+ def abilities(options = {})
32
+ api_request "#{endpoint_uri('ability')}/index", default_options.merge(options)
33
+ end
34
+
35
+ ##
36
+ # Fetch a pet ability
37
+ #
38
+ # @param id [Integer] Pet id
39
+ #
40
+ # @!macro request_options
41
+ #
42
+ # @!macro response
43
+ def ability(id, options = {})
44
+ api_request "#{endpoint_uri('ability')}/#{id}", default_options.merge(options)
45
+ end
46
+
47
+ ##
48
+ # Fetch media for one of the pet abilities listed by the {#abilities} using its *id*
49
+ #
50
+ # @param id [Integer] Pet ability id
51
+ #
52
+ # @!macro request_options
53
+ #
54
+ # @!macro response
55
+ def ability_media(id, options = {})
56
+ api_request "#{base_url(:media)}/pet-ability/#{id}", default_options.merge(options)
57
+ end
58
+
13
59
  protected
14
60
 
15
61
  def endpoint_setup
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.4.0
4
+ version: 0.4.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-06-08 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis