blizzard_api 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -0
  3. data/.rubocop_todo.yml +0 -6
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +93 -34
  7. data/lib/blizzard_api/configuration.rb +32 -0
  8. data/lib/blizzard_api/request.rb +17 -10
  9. data/lib/blizzard_api/version.rb +1 -1
  10. data/lib/blizzard_api/wow.rb +111 -47
  11. data/lib/blizzard_api/wow/community/character.rb +1 -22
  12. data/lib/blizzard_api/wow/game_data/achievement.rb +101 -0
  13. data/lib/blizzard_api/wow/game_data/connected_realm.rb +1 -15
  14. data/lib/blizzard_api/wow/game_data/creature.rb +99 -0
  15. data/lib/blizzard_api/wow/game_data/generic_data_endpoint.rb +14 -7
  16. data/lib/blizzard_api/wow/{community → game_data}/guild.rb +42 -3
  17. data/lib/blizzard_api/wow/game_data/guild_crest.rb +50 -0
  18. data/lib/blizzard_api/wow/game_data/mount.rb +37 -0
  19. data/lib/blizzard_api/wow/game_data/mythic_keystone.rb +97 -0
  20. data/lib/blizzard_api/wow/game_data/mythic_keystone_leaderboard.rb +48 -0
  21. data/lib/blizzard_api/wow/game_data/mythic_raid_leaderboard.rb +28 -0
  22. data/lib/blizzard_api/wow/{community/pets.rb → game_data/pet.rb} +14 -1
  23. data/lib/blizzard_api/wow/game_data/playable_class.rb +10 -4
  24. data/lib/blizzard_api/wow/game_data/pvp_season.rb +53 -0
  25. data/lib/blizzard_api/wow/game_data/pvp_tier.rb +33 -0
  26. data/lib/blizzard_api/wow/game_data/race.rb +1 -15
  27. data/lib/blizzard_api/wow/game_data/realm.rb +0 -14
  28. data/lib/blizzard_api/wow/game_data/region.rb +0 -13
  29. data/lib/blizzard_api/wow/game_data/wow_token.rb +25 -0
  30. data/lib/blizzard_api/wow/profile/character_profile.rb +77 -0
  31. metadata +15 -6
  32. data/lib/blizzard_api/wow/community/achievements.rb +0 -45
  33. data/lib/blizzard_api/wow/community/mount.rb +0 -24
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Schiavo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -145,29 +145,38 @@ files:
145
145
  - lib/blizzard_api/starcraft/request.rb
146
146
  - lib/blizzard_api/version.rb
147
147
  - lib/blizzard_api/wow.rb
148
- - lib/blizzard_api/wow/community/achievements.rb
149
148
  - lib/blizzard_api/wow/community/auction.rb
150
149
  - lib/blizzard_api/wow/community/boss.rb
151
150
  - lib/blizzard_api/wow/community/challenge.rb
152
151
  - lib/blizzard_api/wow/community/character.rb
153
- - lib/blizzard_api/wow/community/guild.rb
154
152
  - lib/blizzard_api/wow/community/item.rb
155
- - lib/blizzard_api/wow/community/mount.rb
156
- - lib/blizzard_api/wow/community/pets.rb
157
153
  - lib/blizzard_api/wow/community/pvp.rb
158
154
  - lib/blizzard_api/wow/community/quest.rb
159
155
  - lib/blizzard_api/wow/community/recipe.rb
160
156
  - lib/blizzard_api/wow/community/spell.rb
161
157
  - lib/blizzard_api/wow/community/zone.rb
158
+ - lib/blizzard_api/wow/game_data/achievement.rb
162
159
  - lib/blizzard_api/wow/game_data/connected_realm.rb
160
+ - lib/blizzard_api/wow/game_data/creature.rb
163
161
  - lib/blizzard_api/wow/game_data/generic_data_endpoint.rb
162
+ - lib/blizzard_api/wow/game_data/guild.rb
163
+ - lib/blizzard_api/wow/game_data/guild_crest.rb
164
+ - lib/blizzard_api/wow/game_data/mount.rb
165
+ - lib/blizzard_api/wow/game_data/mythic_keystone.rb
164
166
  - lib/blizzard_api/wow/game_data/mythic_keystone_affix.rb
167
+ - lib/blizzard_api/wow/game_data/mythic_keystone_leaderboard.rb
168
+ - lib/blizzard_api/wow/game_data/mythic_raid_leaderboard.rb
169
+ - lib/blizzard_api/wow/game_data/pet.rb
165
170
  - lib/blizzard_api/wow/game_data/playable_class.rb
166
171
  - lib/blizzard_api/wow/game_data/playable_specialization.rb
167
172
  - lib/blizzard_api/wow/game_data/power_type.rb
173
+ - lib/blizzard_api/wow/game_data/pvp_season.rb
174
+ - lib/blizzard_api/wow/game_data/pvp_tier.rb
168
175
  - lib/blizzard_api/wow/game_data/race.rb
169
176
  - lib/blizzard_api/wow/game_data/realm.rb
170
177
  - lib/blizzard_api/wow/game_data/region.rb
178
+ - lib/blizzard_api/wow/game_data/wow_token.rb
179
+ - lib/blizzard_api/wow/profile/character_profile.rb
171
180
  - lib/blizzard_api/wow/request.rb
172
181
  homepage: https://gitlab.com/francisschiavo/blizzard_api
173
182
  licenses:
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BlizzardApi
4
- module Wow
5
- ##
6
- # This class allows access to World of Warcraft achievements
7
- #
8
- # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
- #
10
- # You can get an instance of this class using the default region as follows:
11
- # api_instance = BlizzardApi::Wow.achievements
12
- class Achievement < Wow::Request
13
- ##
14
- # Return complete achievement data by achievement id
15
- #
16
- # @param id [Integer] Achievement id
17
- # @!macro request_options
18
- #
19
- # @!macro response
20
- def get(id, options = {})
21
- api_request "#{base_url(:community)}/achievement/#{id}", { ttl: CACHE_TRIMESTER }.merge(options)
22
- end
23
-
24
- ##
25
- # Return a list of possible character achievements
26
- #
27
- # @!macro request_options
28
- #
29
- # @!macro response
30
- def character_achievement_index(options = {})
31
- api_request "#{base_url(:community)}/data/character/achievements", { ttl: CACHE_TRIMESTER }.merge(options)
32
- end
33
-
34
- ##
35
- # Return a list of possible guild achievements
36
- #
37
- # @!macro request_options
38
- #
39
- # @!macro response
40
- def guild_achievement_index(options = {})
41
- api_request "#{base_url(:community)}/data/guild/achievements", { ttl: CACHE_TRIMESTER }.merge(options)
42
- end
43
- end
44
- end
45
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BlizzardApi
4
- module Wow
5
- ##
6
- # This class allows access to World of Warcraft mount data
7
- #
8
- # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
- #
10
- # You can get an instance of this class using the default region as follows:
11
- # api_instance = BlizzardApi::Wow.mount
12
- class Mount < Wow::Request
13
- ##
14
- # Return a list with all available mounts
15
- #
16
- # @!macro request_options
17
- #
18
- # @!macro response
19
- def index(options = {})
20
- api_request "#{base_url(:community)}/mount/", { ttl: CACHE_TRIMESTER }.merge(options)
21
- end
22
- end
23
- end
24
- end