clash_of_clans_api 0.3.0 → 0.4.0

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: c028d861e525d6323453207f3f14885ed9df98346013bd5f586b34e79f95bd41
4
- data.tar.gz: b39deae44556a97575faa02e5902a945bff658ad77367fb8f616045e2b705da7
3
+ metadata.gz: c3406e2ce3f3bf897da83e7a6412a66e692bb76e8df66b83d84a7b3132663af2
4
+ data.tar.gz: 56b4c3b5d2bcd0fd39dcc80a44182e783c24087442fed953e5f85ab8e221b9f1
5
5
  SHA512:
6
- metadata.gz: fffdf976c06723cc81d1134c58f832e24804729420d33fb3bc7645595ef6c0a54b45bcdfcbc68264ca6dfdaf58b525adde6cf7ac15802cdc30dae67e2ce08f16
7
- data.tar.gz: 37644654dd7fdaa88b98d93648cd738a0aec546bf59be37e1443a69cd847b7219bf7426d56226aa1b43f19a59689f007b2be9bce3033ccee6b1d845851e0ea21
6
+ metadata.gz: 451953dbac8d17669134d8cd072425e1f406aa50425b01fc003549a1285337cae130f60831f3294546128cbd717f97255ed0c82372982729f44eeebe0c962d4c
7
+ data.tar.gz: f098a36f13f7925fc402e38517115610a7e686c1ec431bf60bef177b9acf27dee139b839a88ec898dfac4de6af484c86e9f815b717b5fd71a021838b0c38ddcb
@@ -49,10 +49,8 @@ module ClashOfClansApi
49
49
 
50
50
  define_endpoint :location_rankings_clans, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/clans" }
51
51
  define_endpoint :location_rankings_players, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/players" }
52
- define_endpoint :location_rankings_clansversus, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/clans-versus" }
53
52
  define_endpoint :location_rankings_playersbuilderbase, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/players-builder-base" }
54
53
  define_endpoint :location_rankings_clansbuilderbase, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/clans-builder-base" }
55
- define_endpoint :location_rankings_playersversus, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/players-versus" }
56
54
  define_endpoint :locations, method: :get, endpoint: 'locations'
57
55
  define_endpoint :location_rankings_capitals, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}/rankings/capitals" }
58
56
  define_endpoint :location, method: :get, endpoint: proc { |location_id| "locations/#{ApiFrame::Utils.url_escape(location_id)}" }
@@ -20,7 +20,6 @@ module ClashOfClansApi
20
20
  property :clan_level, 'clanLevel'
21
21
  property :clan_points, 'clanPoints'
22
22
  property :clan_builder_base_points, 'clanBuilderBasePoints'
23
- property :clan_versus_points, 'clanVersusPoints'
24
23
  property :clan_capital_points, 'clanCapitalPoints'
25
24
  property :capital_league, 'capitalLeague', type: CapitalLeague
26
25
  property :required_trophies, 'requiredTrophies'
@@ -35,7 +34,6 @@ module ClashOfClansApi
35
34
  property :member_list, 'memberList', type: 'ClashOfClansApi::Models::Player'
36
35
  property :labels, 'labels', type: Label
37
36
  property :required_builder_base_trophies, 'requiredBuilderBaseTrophies'
38
- property :required_versus_trophies, 'requiredVersusTrophies'
39
37
  property :required_townhall_level, 'requiredTownhallLevel'
40
38
  property :clan_capital, 'clanCapital', type: ClanCapital
41
39
  property :chat_language, 'chatLanguage', type: ChatLanguage
@@ -1,4 +1,5 @@
1
1
  require_relative 'base'
2
+ require_relative 'hero_equipment'
2
3
 
3
4
  module ClashOfClansApi
4
5
  module Models
@@ -7,6 +8,7 @@ module ClashOfClansApi
7
8
  property :level, 'level', required: true
8
9
  property :max_level, 'maxLevel', required: true
9
10
  property :village, 'village', required: true
11
+ property :equipment, 'equipment', type: HeroEquipment
10
12
  end
11
13
  end
12
14
  end
@@ -0,0 +1,12 @@
1
+ require_relative 'base'
2
+
3
+ module ClashOfClansApi
4
+ module Models
5
+ class HeroEquipment < Base
6
+ property :name, 'name', required: true
7
+ property :level, 'level', required: true
8
+ property :max_level, 'maxLevel', required: true
9
+ property :village, 'village', required: true
10
+ end
11
+ end
12
+ end
@@ -2,6 +2,7 @@ require_relative 'base'
2
2
  require_relative 'achievement'
3
3
  require_relative 'builder_base_league'
4
4
  require_relative 'hero'
5
+ require_relative 'hero_equipment'
5
6
  require_relative 'label'
6
7
  require_relative 'league'
7
8
  require_relative 'legend_statistics'
@@ -24,10 +25,7 @@ module ClashOfClansApi
24
25
  property :defense_wins, 'defenseWins'
25
26
  property :builder_hall_level, 'builderHallLevel'
26
27
  property :builder_base_trophies, 'builderBaseTrophies'
27
- property :versus_trophies, 'versusTrophies'
28
28
  property :best_builder_base_trophies, 'bestBuilderBaseTrophies'
29
- property :best_versus_trophies, 'bestVersusTrophies'
30
- property :versus_battle_wins, 'versusBattleWins'
31
29
  property :role, 'role'
32
30
  property :war_preference, 'warPreference'
33
31
  property :clan_rank, 'clanRank'
@@ -46,6 +44,7 @@ module ClashOfClansApi
46
44
  property :troops, 'troops', type: Troop
47
45
  property :heroes, 'heroes', type: Hero
48
46
  property :spells, 'spells', type: Spell
47
+ property :hero_equipment, 'heroEquipment', type: HeroEquipment
49
48
  end
50
49
  end
51
50
  end
@@ -21,7 +21,7 @@ module ClashOfClansApi
21
21
  'Cookie' => "session=#{cookies['session'][0]}",
22
22
  }
23
23
  else
24
- raise NoSuccessError, response
24
+ raise ApiFrame::NoSuccessError, response
25
25
  end
26
26
  end
27
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClashOfClansApi
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clash_of_clans_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - expeehaa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-02 00:00:00.000000000 Z
11
+ date: 2023-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_frame
@@ -45,6 +45,7 @@ files:
45
45
  - lib/clash_of_clans_api/models/clan_capital_district.rb
46
46
  - lib/clash_of_clans_api/models/clan_location.rb
47
47
  - lib/clash_of_clans_api/models/hero.rb
48
+ - lib/clash_of_clans_api/models/hero_equipment.rb
48
49
  - lib/clash_of_clans_api/models/icon_set.rb
49
50
  - lib/clash_of_clans_api/models/invalid_data_error.rb
50
51
  - lib/clash_of_clans_api/models/label.rb
@@ -83,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
84
  requirements:
84
85
  - - ">="
85
86
  - !ruby/object:Gem::Version
86
- version: 2.7.0
87
+ version: 3.0.0
87
88
  required_rubygems_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
90
  - - ">="