clash_of_clans_api 0.3.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: c028d861e525d6323453207f3f14885ed9df98346013bd5f586b34e79f95bd41
4
- data.tar.gz: b39deae44556a97575faa02e5902a945bff658ad77367fb8f616045e2b705da7
3
+ metadata.gz: fad57278f4c548b496dc331ed301684b8f86814c3cda412411fc93aa6de1b8fb
4
+ data.tar.gz: 35f2d2e5fbe8a58702bfc9ac07bbb708812162321aa2bdc9c004a450358626aa
5
5
  SHA512:
6
- metadata.gz: fffdf976c06723cc81d1134c58f832e24804729420d33fb3bc7645595ef6c0a54b45bcdfcbc68264ca6dfdaf58b525adde6cf7ac15802cdc30dae67e2ce08f16
7
- data.tar.gz: 37644654dd7fdaa88b98d93648cd738a0aec546bf59be37e1443a69cd847b7219bf7426d56226aa1b43f19a59689f007b2be9bce3033ccee6b1d845851e0ea21
6
+ metadata.gz: 41e9cd2fee91bda4f81f8bf7459a78b24167357d5350c6d3ec72de25a8a33caccef9a39c3185da7a9e301bf96295283937c42f05fa8fa2f4866fbcd58c69b0c4
7
+ data.tar.gz: 4bc9e643ba24e1a720a51b7a8fe724155f3048f1803b16971cb002dd5f9e3d49925967da9c20d31fb057cfdd7eae6feb35bc163c6d59407ff8eab6572fbc339c
@@ -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)}" }
@@ -1,6 +1,7 @@
1
1
  require_relative 'api'
2
2
  require_relative 'models/paginated_response'
3
3
  require_relative 'models/clan'
4
+ require_relative 'models/clan_war_league_group'
4
5
  require_relative 'models/player'
5
6
  require_relative 'models/league'
6
7
  require_relative 'models/war'
@@ -17,6 +18,14 @@ module ClashOfClansApi
17
18
  api.perform_request(:get, 'test').code == '404'
18
19
  end
19
20
 
21
+ def clan_currentwar_leaguegroup(clan_tag)
22
+ Models::ClanWarLeagueGroup.new(api.clan_currentwar_leaguegroup(clan_tag), self)
23
+ end
24
+
25
+ def clanwarleagues_war(war_tag)
26
+ Models::War.new(api.clanwarleagues_war(war_tag), self)
27
+ end
28
+
20
29
  def clan_currentwar(clan_tag)
21
30
  Models::War.new(api.clan_currentwar(clan_tag), self)
22
31
  end
@@ -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
@@ -0,0 +1,15 @@
1
+ require_relative 'base'
2
+ require_relative 'clan_war_league_clan_member'
3
+ require_relative 'icon_set'
4
+
5
+ module ClashOfClansApi
6
+ module Models
7
+ class ClanWarLeagueClan < Base
8
+ property :tag, 'tag', required: true
9
+ property :name, 'name', required: true
10
+ property :clan_level, 'clanLevel', required: true
11
+ property :badge_urls, 'badgeUrls', required: true, type: IconSet
12
+ property :members, 'members', required: true, type: ClanWarLeagueClanMember
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ require_relative 'base'
2
+
3
+ module ClashOfClansApi
4
+ module Models
5
+ class ClanWarLeagueClanMember < Base
6
+ property :tag, 'tag', required: true
7
+ property :name, 'name', required: true
8
+ property :townhall_level, 'townhallLevel', required: true
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require_relative 'base'
2
+ require_relative 'clan_war_league_clan'
3
+ require_relative 'clan_war_league_round'
4
+
5
+ module ClashOfClansApi
6
+ module Models
7
+ class ClanWarLeagueGroup < Base
8
+ property :state, 'state', required: true
9
+ property :season, 'season', required: true
10
+ property :clans, 'clans', required: true, type: ClanWarLeagueClan
11
+ property :rounds, 'rounds', required: true, type: ClanWarLeagueRound
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ require_relative 'base'
2
+
3
+ module ClashOfClansApi
4
+ module Models
5
+ class ClanWarLeagueRound < Base
6
+ property :war_tags, 'warTags', required: true
7
+ end
8
+ end
9
+ end
@@ -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.1'
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.1
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: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_frame
@@ -44,7 +44,12 @@ files:
44
44
  - lib/clash_of_clans_api/models/clan_capital.rb
45
45
  - lib/clash_of_clans_api/models/clan_capital_district.rb
46
46
  - lib/clash_of_clans_api/models/clan_location.rb
47
+ - lib/clash_of_clans_api/models/clan_war_league_clan.rb
48
+ - lib/clash_of_clans_api/models/clan_war_league_clan_member.rb
49
+ - lib/clash_of_clans_api/models/clan_war_league_group.rb
50
+ - lib/clash_of_clans_api/models/clan_war_league_round.rb
47
51
  - lib/clash_of_clans_api/models/hero.rb
52
+ - lib/clash_of_clans_api/models/hero_equipment.rb
48
53
  - lib/clash_of_clans_api/models/icon_set.rb
49
54
  - lib/clash_of_clans_api/models/invalid_data_error.rb
50
55
  - lib/clash_of_clans_api/models/label.rb
@@ -83,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
88
  requirements:
84
89
  - - ">="
85
90
  - !ruby/object:Gem::Version
86
- version: 2.7.0
91
+ version: 3.0.0
87
92
  required_rubygems_version: !ruby/object:Gem::Requirement
88
93
  requirements:
89
94
  - - ">="
90
95
  - !ruby/object:Gem::Version
91
96
  version: '0'
92
97
  requirements: []
93
- rubygems_version: 3.4.10
98
+ rubygems_version: 3.5.3
94
99
  signing_key:
95
100
  specification_version: 4
96
101
  summary: Client library for interacting with the ClashOfClans API.