pychpp 0.4.6__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {pychpp-0.4.6 → pychpp-0.4.8}/PKG-INFO +54 -44
  2. {pychpp-0.4.6 → pychpp-0.4.8}/README.md +53 -43
  3. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/chpp.py +102 -1
  4. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/ht_field.py +1 -1
  5. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/ht_model.py +3 -1
  6. pychpp-0.4.8/pychpp/models/xml/player_events.py +41 -0
  7. pychpp-0.4.8/pychpp/models/xml/search.py +49 -0
  8. pychpp-0.4.8/pychpp/models/xml/staff_avatars.py +61 -0
  9. pychpp-0.4.8/pychpp/models/xml/staff_list.py +58 -0
  10. pychpp-0.4.8/pychpp/models/xml/supporters.py +104 -0
  11. pychpp-0.4.8/pychpp/models/xml/tournament_details.py +46 -0
  12. pychpp-0.4.8/pychpp/models/xml/tournament_fixtures.py +46 -0
  13. pychpp-0.4.8/pychpp/models/xml/tournament_league_tables.py +54 -0
  14. pychpp-0.4.8/pychpp/models/xml/tournament_list.py +50 -0
  15. pychpp-0.4.8/pychpp/models/xml/training_events.py +46 -0
  16. {pychpp-0.4.6 → pychpp-0.4.8}/pyproject.toml +1 -1
  17. {pychpp-0.4.6 → pychpp-0.4.8}/LICENSE +0 -0
  18. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/__init__.py +0 -0
  19. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/fixtures/__init__.py +0 -0
  20. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/fixtures/ht_datetime.py +0 -0
  21. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/fixtures/ht_error.py +0 -0
  22. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/__init__.py +0 -0
  23. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/__init__.py +0 -0
  24. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/__init__.py +0 -0
  25. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_arena.py +0 -0
  26. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_country.py +0 -0
  27. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_league.py +0 -0
  28. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_league_unit.py +0 -0
  29. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_match.py +0 -0
  30. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_player.py +0 -0
  31. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_region.py +0 -0
  32. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_team.py +0 -0
  33. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/base/ht_user.py +0 -0
  34. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_arena.py +0 -0
  35. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_challenge.py +0 -0
  36. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_league.py +0 -0
  37. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_league_unit.py +0 -0
  38. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_match.py +0 -0
  39. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_match_lineup.py +0 -0
  40. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_matches_archive.py +0 -0
  41. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_player.py +0 -0
  42. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_region.py +0 -0
  43. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_team.py +0 -0
  44. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_transfer_history.py +0 -0
  45. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_user.py +0 -0
  46. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_youth_player.py +0 -0
  47. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/custom/ht_youth_team.py +0 -0
  48. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/ht_init_var.py +0 -0
  49. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/ht_version.py +0 -0
  50. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/ht_xml.py +0 -0
  51. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/__init__.py +0 -0
  52. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/achievements.py +0 -0
  53. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/alliance_details.py +0 -0
  54. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/alliances.py +0 -0
  55. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/arena_details.py +0 -0
  56. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/avatars.py +0 -0
  57. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/bookmarks.py +0 -0
  58. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/challenges.py +0 -0
  59. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/club.py +0 -0
  60. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/cup_matches.py +0 -0
  61. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/current_bids.py +0 -0
  62. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/economy.py +0 -0
  63. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/fans.py +0 -0
  64. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/hof_players.py +0 -0
  65. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/ladder_details.py +0 -0
  66. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/ladder_list.py +0 -0
  67. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/league_details.py +0 -0
  68. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/league_fixtures.py +0 -0
  69. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/league_levels.py +0 -0
  70. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/live.py +0 -0
  71. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/manager_compendium.py +0 -0
  72. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/match_details.py +0 -0
  73. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/match_lineup.py +0 -0
  74. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/match_orders.py +0 -0
  75. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/matches.py +0 -0
  76. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/matches_archive.py +0 -0
  77. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/national_players.py +0 -0
  78. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/national_team_details.py +0 -0
  79. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/national_team_matches.py +0 -0
  80. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/national_teams.py +0 -0
  81. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/player_details.py +0 -0
  82. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/players.py +0 -0
  83. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/region_details.py +0 -0
  84. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/team_details.py +0 -0
  85. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/training.py +0 -0
  86. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/transfers_team.py +0 -0
  87. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/world_cup.py +0 -0
  88. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/world_details.py +0 -0
  89. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/youth_player_details.py +0 -0
  90. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/youth_player_list.py +0 -0
  91. {pychpp-0.4.6 → pychpp-0.4.8}/pychpp/models/xml/youth_team_details.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pychpp
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: framework created to use the API provided by the online game Hattrick
5
5
  Home-page: https://framagit.org/Pierre86/pychpp
6
6
  License: Apache-2.0
@@ -165,52 +165,62 @@ Then, to use this new class:
165
165
  In this way, only the data you're really interested in is parsed, which can in some cases be interesting from a performance point of view.
166
166
 
167
167
  ## List of supported CHPP XML files
168
- ![40/57](https://progress-bar.xyz/70/?title=40%20on%2057)
168
+ ![50/57](https://progress-bar.xyz/88/?title=50%20on%2057)
169
169
 
170
170
  The following table shows the CHPP XML files that are currently supported:
171
171
 
172
- | pyCHPP class | CHPP XML files |
173
- |:-------------------:|:-------------------------:|
174
- | Achievements | `achievements.xml` |
175
- | Alliances | `alliances.xml` |
176
- | AllianceDetails | `alliancedetails.xml` |
177
- | Arena | `arenadetails.xml` |
178
- | Avatars | `avatars.xml` |
179
- | Bookmarks | `bookmarks.xml` |
180
- | Challenges | `challenges.xml` |
181
- | Club | `club.xml` |
182
- | CupMatches | `cupmatches.xml` |
183
- | CurrentBids | `currentbids.xml` |
184
- | Economy | `economy.xml` |
185
- | Fans | `fans.xml` |
186
- | HallOfFamePlayers | `hofplayers.xml` |
187
- | LadderDetails | `ladderdetails.xml` |
188
- | LadderList | `ladderlist.xml` |
189
- | LeagueDetails | `leaguedetails.xml` |
190
- | LeagueFixtures | `leaguefixtures.xml` |
191
- | LeagueLevels | `leaguelevels.xml` |
192
- | Live | `live.xml` |
193
- | ManagerCompendium | `managercompendium.xml` |
194
- | MatchDetails | `matchdetails.xml` |
195
- | MatchLineup | `matchlineup.xml` |
196
- | MatchOrders | `matchorders.xml` |
197
- | MatchesArchive | `matchesarchive.xml` |
198
- | Matches | `matches.xml` |
199
- | NationalTeamDetails | `nationalteamdetails.xml` |
200
- | NationalTeamMatches | `nationalteammatches.xml` |
201
- | NationalTeams | `nationalteams.xml` |
202
- | NationalPlayers | `nationalplayers.xml` |
203
- | PlayerDetails | `playerdetails.xml` |
204
- | Players | `players.xml` |
205
- | RegionDetails | `regiondetails.xml` |
206
- | TeamDetails | `teamdetails.xml` |
207
- | Training | `training.xml` |
208
- | TransfersTeam | `transfersteam.xml` |
209
- | WorldCup | `worldcup.xml` |
210
- | WorldDetails | `worlddetails.xml` |
211
- | YouthPlayerDetails | `youthplayerdetails.xml` |
212
- | YouthPlayerList | `youthplayerlist.xml` |
213
- | YouthTeamDetails | `youthteamdetails.xml` |
172
+ | pyCHPP class | CHPP XML files |
173
+ |:----------------------:|:----------------------------:|
174
+ | Achievements | `achievements.xml` |
175
+ | Alliances | `alliances.xml` |
176
+ | AllianceDetails | `alliancedetails.xml` |
177
+ | Arena | `arenadetails.xml` |
178
+ | Avatars | `avatars.xml` |
179
+ | Bookmarks | `bookmarks.xml` |
180
+ | Challenges | `challenges.xml` |
181
+ | Club | `club.xml` |
182
+ | CupMatches | `cupmatches.xml` |
183
+ | CurrentBids | `currentbids.xml` |
184
+ | Economy | `economy.xml` |
185
+ | Fans | `fans.xml` |
186
+ | HallOfFamePlayers | `hofplayers.xml` |
187
+ | LadderDetails | `ladderdetails.xml` |
188
+ | LadderList | `ladderlist.xml` |
189
+ | LeagueDetails | `leaguedetails.xml` |
190
+ | LeagueFixtures | `leaguefixtures.xml` |
191
+ | LeagueLevels | `leaguelevels.xml` |
192
+ | Live | `live.xml` |
193
+ | ManagerCompendium | `managercompendium.xml` |
194
+ | MatchDetails | `matchdetails.xml` |
195
+ | MatchLineup | `matchlineup.xml` |
196
+ | MatchOrders | `matchorders.xml` |
197
+ | MatchesArchive | `matchesarchive.xml` |
198
+ | Matches | `matches.xml` |
199
+ | NationalTeamDetails | `nationalteamdetails.xml` |
200
+ | NationalTeamMatches | `nationalteammatches.xml` |
201
+ | NationalTeams | `nationalteams.xml` |
202
+ | NationalPlayers | `nationalplayers.xml` |
203
+ | PlayerDetails | `playerdetails.xml` |
204
+ | PlayerEvents | `playerevents.xml` |
205
+ | Players | `players.xml` |
206
+ | RegionDetails | `regiondetails.xml` |
207
+ | Search | `search.xml` |
208
+ | StaffAvatars | `staffavatars.xml` |
209
+ | StaffList | `stafflist.xml` |
210
+ | Supporters | `supporters.xml` |
211
+ | TeamDetails | `teamdetails.xml` |
212
+ | TournamentDetails | `tournamentdetails.xml` |
213
+ | TournamentFixtures | `tournamentfixtures.xml` |
214
+ | TournamentLeagueTables | `tournamentleaguetables.xml` |
215
+ | TournamentList | `tournamentlist.xml` |
216
+ | Training | `training.xml` |
217
+ | TrainingEvents | `trainingevents.xml` |
218
+ | TransfersTeam | `transfersteam.xml` |
219
+ | WorldCup | `worldcup.xml` |
220
+ | WorldDetails | `worlddetails.xml` |
221
+ | YouthPlayerDetails | `youthplayerdetails.xml` |
222
+ | YouthPlayerList | `youthplayerlist.xml` |
223
+ | YouthTeamDetails | `youthteamdetails.xml` |
214
224
 
215
225
  ## License
216
226
  pyCHPP is licensed under the Apache License 2.0.
@@ -143,52 +143,62 @@ Then, to use this new class:
143
143
  In this way, only the data you're really interested in is parsed, which can in some cases be interesting from a performance point of view.
144
144
 
145
145
  ## List of supported CHPP XML files
146
- ![40/57](https://progress-bar.xyz/70/?title=40%20on%2057)
146
+ ![50/57](https://progress-bar.xyz/88/?title=50%20on%2057)
147
147
 
148
148
  The following table shows the CHPP XML files that are currently supported:
149
149
 
150
- | pyCHPP class | CHPP XML files |
151
- |:-------------------:|:-------------------------:|
152
- | Achievements | `achievements.xml` |
153
- | Alliances | `alliances.xml` |
154
- | AllianceDetails | `alliancedetails.xml` |
155
- | Arena | `arenadetails.xml` |
156
- | Avatars | `avatars.xml` |
157
- | Bookmarks | `bookmarks.xml` |
158
- | Challenges | `challenges.xml` |
159
- | Club | `club.xml` |
160
- | CupMatches | `cupmatches.xml` |
161
- | CurrentBids | `currentbids.xml` |
162
- | Economy | `economy.xml` |
163
- | Fans | `fans.xml` |
164
- | HallOfFamePlayers | `hofplayers.xml` |
165
- | LadderDetails | `ladderdetails.xml` |
166
- | LadderList | `ladderlist.xml` |
167
- | LeagueDetails | `leaguedetails.xml` |
168
- | LeagueFixtures | `leaguefixtures.xml` |
169
- | LeagueLevels | `leaguelevels.xml` |
170
- | Live | `live.xml` |
171
- | ManagerCompendium | `managercompendium.xml` |
172
- | MatchDetails | `matchdetails.xml` |
173
- | MatchLineup | `matchlineup.xml` |
174
- | MatchOrders | `matchorders.xml` |
175
- | MatchesArchive | `matchesarchive.xml` |
176
- | Matches | `matches.xml` |
177
- | NationalTeamDetails | `nationalteamdetails.xml` |
178
- | NationalTeamMatches | `nationalteammatches.xml` |
179
- | NationalTeams | `nationalteams.xml` |
180
- | NationalPlayers | `nationalplayers.xml` |
181
- | PlayerDetails | `playerdetails.xml` |
182
- | Players | `players.xml` |
183
- | RegionDetails | `regiondetails.xml` |
184
- | TeamDetails | `teamdetails.xml` |
185
- | Training | `training.xml` |
186
- | TransfersTeam | `transfersteam.xml` |
187
- | WorldCup | `worldcup.xml` |
188
- | WorldDetails | `worlddetails.xml` |
189
- | YouthPlayerDetails | `youthplayerdetails.xml` |
190
- | YouthPlayerList | `youthplayerlist.xml` |
191
- | YouthTeamDetails | `youthteamdetails.xml` |
150
+ | pyCHPP class | CHPP XML files |
151
+ |:----------------------:|:----------------------------:|
152
+ | Achievements | `achievements.xml` |
153
+ | Alliances | `alliances.xml` |
154
+ | AllianceDetails | `alliancedetails.xml` |
155
+ | Arena | `arenadetails.xml` |
156
+ | Avatars | `avatars.xml` |
157
+ | Bookmarks | `bookmarks.xml` |
158
+ | Challenges | `challenges.xml` |
159
+ | Club | `club.xml` |
160
+ | CupMatches | `cupmatches.xml` |
161
+ | CurrentBids | `currentbids.xml` |
162
+ | Economy | `economy.xml` |
163
+ | Fans | `fans.xml` |
164
+ | HallOfFamePlayers | `hofplayers.xml` |
165
+ | LadderDetails | `ladderdetails.xml` |
166
+ | LadderList | `ladderlist.xml` |
167
+ | LeagueDetails | `leaguedetails.xml` |
168
+ | LeagueFixtures | `leaguefixtures.xml` |
169
+ | LeagueLevels | `leaguelevels.xml` |
170
+ | Live | `live.xml` |
171
+ | ManagerCompendium | `managercompendium.xml` |
172
+ | MatchDetails | `matchdetails.xml` |
173
+ | MatchLineup | `matchlineup.xml` |
174
+ | MatchOrders | `matchorders.xml` |
175
+ | MatchesArchive | `matchesarchive.xml` |
176
+ | Matches | `matches.xml` |
177
+ | NationalTeamDetails | `nationalteamdetails.xml` |
178
+ | NationalTeamMatches | `nationalteammatches.xml` |
179
+ | NationalTeams | `nationalteams.xml` |
180
+ | NationalPlayers | `nationalplayers.xml` |
181
+ | PlayerDetails | `playerdetails.xml` |
182
+ | PlayerEvents | `playerevents.xml` |
183
+ | Players | `players.xml` |
184
+ | RegionDetails | `regiondetails.xml` |
185
+ | Search | `search.xml` |
186
+ | StaffAvatars | `staffavatars.xml` |
187
+ | StaffList | `stafflist.xml` |
188
+ | Supporters | `supporters.xml` |
189
+ | TeamDetails | `teamdetails.xml` |
190
+ | TournamentDetails | `tournamentdetails.xml` |
191
+ | TournamentFixtures | `tournamentfixtures.xml` |
192
+ | TournamentLeagueTables | `tournamentleaguetables.xml` |
193
+ | TournamentList | `tournamentlist.xml` |
194
+ | Training | `training.xml` |
195
+ | TrainingEvents | `trainingevents.xml` |
196
+ | TransfersTeam | `transfersteam.xml` |
197
+ | WorldCup | `worldcup.xml` |
198
+ | WorldDetails | `worlddetails.xml` |
199
+ | YouthPlayerDetails | `youthplayerdetails.xml` |
200
+ | YouthPlayerList | `youthplayerlist.xml` |
201
+ | YouthTeamDetails | `youthteamdetails.xml` |
192
202
 
193
203
  ## License
194
204
  pyCHPP is licensed under the Apache License 2.0.
@@ -14,7 +14,10 @@ from pychpp.models.xml import (manager_compendium, team_details, achievements, a
14
14
  matches_archive, match_details, cup_matches, alliances,
15
15
  alliance_details, avatars, bookmarks, club, current_bids, economy,
16
16
  fans, hof_players, ladder_details, ladder_list, league_levels, live,
17
- matches, match_orders, national_team_matches, national_players)
17
+ matches, match_orders, national_team_matches, national_players,
18
+ player_events, search, staff_avatars, staff_list, supporters,
19
+ tournament_details, tournament_fixtures, tournament_league_tables,
20
+ tournament_list, training_events)
18
21
  from pychpp.models.custom import (ht_team, ht_arena, ht_user, ht_region, ht_youth_team, ht_player,
19
22
  ht_league_unit, ht_youth_player, ht_league, ht_matches_archive,
20
23
  ht_match, ht_challenge, ht_match_lineup, ht_transfer_history)
@@ -789,6 +792,14 @@ class CHPPXml(CHPPBase):
789
792
  raise ValueError("if set, 'action_type' must be equal to"
790
793
  "'view', 'setmatchorder' or 'SupporterStats'")
791
794
 
795
+ def xml_player_events(
796
+ self, player_id: int = None, **kwargs,
797
+ ) -> player_events.PlayerEvents:
798
+
799
+ return player_events.PlayerEvents(
800
+ chpp=self, player_id=player_id, **kwargs,
801
+ )
802
+
792
803
  def xml_players(self, action_type: str = 'view', order_by: str = None,
793
804
  team_id: int = None, include_match_info: bool = None, **kwargs,
794
805
  ) -> Union[players.PlayersView,
@@ -836,6 +847,55 @@ class CHPPXml(CHPPBase):
836
847
  chpp=self, region_id=region_id, **kwargs,
837
848
  )
838
849
 
850
+ def xml_search(
851
+ self, search_type: int = None, search_string: str = None,
852
+ search_string_2: str = None, search_id: int = None, search_league_id: int = None,
853
+ page_index: int = None, **kwargs,
854
+ ) -> search.Search:
855
+
856
+ return search.Search(
857
+ chpp=self, search_type=search_type, search_string=search_string,
858
+ search_string_2=search_string_2, search_id=search_id,
859
+ search_league_id=search_league_id, page_index=page_index, **kwargs,
860
+ )
861
+
862
+ def xml_staff_avatars(
863
+ self, team_id: int = None, **kwargs,
864
+ ) -> staff_avatars.StaffAvatars:
865
+
866
+ return staff_avatars.StaffAvatars(
867
+ chpp=self, team_id=team_id, **kwargs,
868
+ )
869
+
870
+ def xml_staff_list(
871
+ self, team_id: int = None, **kwargs,
872
+ ) -> staff_list.StaffList:
873
+
874
+ return staff_list.StaffList(
875
+ chpp=self, team_id=team_id, **kwargs,
876
+ )
877
+
878
+ def xml_supporters(
879
+ self, action_type: str = 'supportedteams',
880
+ user_id: int = None, team_id: int = None, **kwargs,
881
+ ) -> Union[supporters.SupportersSupportedTeams,
882
+ supporters.SupportersMySupporters,
883
+ ]:
884
+
885
+ if action_type == 'supportedteams':
886
+ return supporters.SupportersSupportedTeams(
887
+ chpp=self, action_type=action_type, user_id=user_id, **kwargs,
888
+ )
889
+
890
+ elif action_type == 'mysupporters':
891
+ return supporters.SupportersMySupporters(
892
+ chpp=self, action_type=action_type, team_id=team_id, **kwargs,
893
+ )
894
+
895
+ else:
896
+ raise ValueError("if set, 'action_type' must be equal to"
897
+ "'view', 'supportedteams' or 'mysupporters'")
898
+
839
899
  def xml_team_details(
840
900
  self, team_id: int = None, user_id: int = None,
841
901
  include_domestics_flags: bool = None, include_flags: bool = None,
@@ -849,6 +909,39 @@ class CHPPXml(CHPPBase):
849
909
  ** kwargs,
850
910
  )
851
911
 
912
+ def xml_tournament_details(
913
+ self, tournament_id: int, season: int = None, **kwargs,
914
+ ) -> tournament_details.TournamentDetails:
915
+
916
+ return tournament_details.TournamentDetails(
917
+ chpp=self, tournament_id=tournament_id, season=season, **kwargs,
918
+ )
919
+
920
+ def xml_tournament_fixtures(
921
+ self, tournament_id: int, season: int = None, **kwargs,
922
+ ) -> tournament_fixtures.TournamentFixtures:
923
+
924
+ return tournament_fixtures.TournamentFixtures(
925
+ chpp=self, tournament_id=tournament_id, season=season, **kwargs,
926
+ )
927
+
928
+ def xml_tournament_league_tables(
929
+ self, tournament_id: int, season: int = None, world_cup_round: int = None, **kwargs,
930
+ ) -> tournament_league_tables.TournamentLeagueTables:
931
+
932
+ return tournament_league_tables.TournamentLeagueTables(
933
+ chpp=self, tournament_id=tournament_id, season=season,
934
+ world_cup_round=world_cup_round, **kwargs,
935
+ )
936
+
937
+ def xml_tournament_list(
938
+ self, team_id: int = None, **kwargs,
939
+ ) -> tournament_list.TournamentList:
940
+
941
+ return tournament_list.TournamentList(
942
+ chpp=self, team_id=team_id, **kwargs,
943
+ )
944
+
852
945
  def xml_training(
853
946
  self, action_type: str = 'view', team_id: int = None,
854
947
  training_type: int = None, training_level: int = None,
@@ -881,6 +974,14 @@ class CHPPXml(CHPPBase):
881
974
  raise ValueError("if set, 'action_type' must be equal to"
882
975
  "'view', 'setTraining' or 'stats'")
883
976
 
977
+ def xml_training_events(
978
+ self, player_id: int, **kwargs,
979
+ ) -> training_events.TrainingEvents:
980
+
981
+ return training_events.TrainingEvents(
982
+ chpp=self, player_id=player_id, **kwargs,
983
+ )
984
+
884
985
  def xml_transfers_team(
885
986
  self, team_id: int = None, page_index: int = None, **kwargs,
886
987
  ) -> transfers_team.TransfersTeam:
@@ -15,7 +15,7 @@ class HTField(HTBaseField):
15
15
  version: str = None
16
16
  items: str = None
17
17
  attrib: str = None
18
- xml_prefix: str = ''
18
+ xml_prefix: str = None
19
19
  suppl_attrs: dict = field(default_factory=dict)
20
20
 
21
21
 
@@ -211,7 +211,9 @@ class HTModel(metaclass=MetaHTModel):
211
211
  if proxy_path and proxy_path[-1] != '/':
212
212
  proxy_path += '/'
213
213
  proxy_path += previous_xml_prefix + target_field.path
214
- previous_xml_prefix = target_field.xml_prefix
214
+ previous_xml_prefix = (target_field.xml_prefix
215
+ if target_field.xml_prefix is not None
216
+ else '')
215
217
 
216
218
  if issubclass(type_, HTModel):
217
219
  target_cls = type_
@@ -0,0 +1,41 @@
1
+ from datetime import datetime
2
+ from typing import List
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestPlayerEvents(HTModel):
10
+ """
11
+ Player Events - Request arguments
12
+ """
13
+ SOURCE_FILE = 'playerevents'
14
+ LAST_VERSION = '1.3'
15
+
16
+ _r_player_id: int = HTInitVar('playerID', init_arg='player_id')
17
+
18
+
19
+ class PlayerEvents(RequestPlayerEvents):
20
+ """
21
+ Player Events
22
+ """
23
+ user_supporter_tier: str = HTField('UserSupporterTier')
24
+ player: 'Player' = HTField('Player')
25
+
26
+
27
+ class Player(HTModel):
28
+ """
29
+ Player Events -> Player
30
+ """
31
+ id: int = HTField('PlayerID')
32
+ events: List['EventItem'] = HTField('PlayerEvents', items='PlayerEvent')
33
+
34
+
35
+ class EventItem(HTModel):
36
+ """
37
+ Player Events -> Player -> Events -> Event item
38
+ """
39
+ date: datetime = HTField('EventDate')
40
+ type_id: int = HTField('PlayerEventTypeID')
41
+ text: str = HTField('EventText')
@@ -0,0 +1,49 @@
1
+ from typing import Optional, List
2
+
3
+ from pychpp.models.ht_field import HTField
4
+ from pychpp.models.ht_init_var import HTInitVar
5
+ from pychpp.models.ht_model import HTModel
6
+
7
+
8
+ class RequestSearch(HTModel):
9
+ """
10
+ Search - Request arguments
11
+ """
12
+ SOURCE_FILE = 'search'
13
+ LAST_VERSION = '1.2'
14
+
15
+ _r_search_type: Optional[int] = HTInitVar('searchType', init_arg='search_type')
16
+ _r_search_string: Optional[str] = HTInitVar('searchString', init_arg='search_string')
17
+ _r_search_string_2: Optional[int] = HTInitVar('searchString2', init_arg='search_string_2')
18
+ _r_search_id: Optional[int] = HTInitVar('searchID', init_arg='search_id')
19
+ _r_search_league_id: Optional[int] = HTInitVar('searchLeagueID', init_arg='search_league_id')
20
+ _r_page_index: Optional[int] = HTInitVar('pageIndex', init_arg='page_index')
21
+
22
+
23
+ class Search(RequestSearch):
24
+ """
25
+ Search
26
+ """
27
+ search_params: 'SearchParams' = HTField('SearchParams')
28
+ page_index: int = HTField('PageIndex')
29
+ pages: int = HTField('Pages')
30
+ search_results: List['ResultItem'] = HTField('SearchResults', items='Result')
31
+
32
+
33
+ class SearchParams(HTModel):
34
+ """
35
+ Search -> Search params
36
+ """
37
+ type: int = HTField('SearchType')
38
+ string: str = HTField('SearchString')
39
+ string_2: str = HTField('SearchString2')
40
+ id: int = HTField('SearchID')
41
+ league_id: int = HTField('SearchLeagueID')
42
+
43
+
44
+ class ResultItem(HTModel):
45
+ """
46
+ Search -> Search results -> Result item
47
+ """
48
+ id: int = HTField('ResultID')
49
+ name: str = HTField('ResultName')
@@ -0,0 +1,61 @@
1
+ from typing import List, Optional
2
+
3
+ from pychpp.models.ht_field import HTField
4
+ from pychpp.models.ht_init_var import HTInitVar
5
+ from pychpp.models.ht_model import HTModel
6
+
7
+
8
+ class RequestStaffAvatars(HTModel):
9
+ """
10
+ Staff Avatars - Request arguments
11
+ """
12
+ SOURCE_FILE = 'staffavatars'
13
+ LAST_VERSION = '1.1'
14
+
15
+ _r_team_id: Optional[int] = HTInitVar('teamId', init_arg='team_id')
16
+
17
+
18
+ class StaffAvatars(RequestStaffAvatars):
19
+ """
20
+ Staff Avatars
21
+ """
22
+ trainer: 'Trainer' = HTField('Trainer')
23
+ staff_members: List['StaffMemberItem'] = HTField('StaffMembers', items='Staff')
24
+
25
+
26
+ class CommonTrainerStaffMemberItem(HTModel):
27
+ """
28
+ Staff Avatars -> Trainer / Staff member item
29
+ """
30
+ avatar: 'Avatar' = HTField('Avatar')
31
+
32
+
33
+ class Avatar(HTModel):
34
+ """
35
+ Staff Avatars -> Trainer / Staff member item -> Avatar
36
+ """
37
+ background_image: str = HTField('BackgroundImage')
38
+ layers: List['LayerItem'] = HTField('.', items='Layer')
39
+
40
+
41
+ class LayerItem(HTModel):
42
+ """
43
+ Staff Avatars -> Trainer / Staff member item -> Avatar -> Layer
44
+ """
45
+ x: int = HTField('.', attrib='x')
46
+ y: int = HTField('.', attrib='y')
47
+ image: str = HTField('Image')
48
+
49
+
50
+ class Trainer(CommonTrainerStaffMemberItem):
51
+ """
52
+ Staff Avatars -> Trainer
53
+ """
54
+ id: int = HTField('TrainerId')
55
+
56
+
57
+ class StaffMemberItem(CommonTrainerStaffMemberItem):
58
+ """
59
+ Staff Avatars -> Staff members -> Staff member item
60
+ """
61
+ id: int = HTField('StaffId')
@@ -0,0 +1,58 @@
1
+ from datetime import datetime
2
+ from typing import Optional, List
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestStaffList(HTModel):
10
+ """
11
+ Staff List - Request arguments
12
+ """
13
+ SOURCE_FILE = 'stafflist'
14
+ LAST_VERSION = '1.2'
15
+
16
+ _r_team_id: Optional[int] = HTInitVar('teamId', init_arg='team_id')
17
+
18
+
19
+ class StaffList(RequestStaffList):
20
+ """
21
+ Staff List
22
+ """
23
+ XML_PREFIX = 'StaffList/'
24
+
25
+ trainer: 'Trainer' = HTField('Trainer')
26
+ staff_members: List['StaffMemberItem'] = HTField('StaffMembers', items='Staff')
27
+ total_staff_members: int = HTField('TotalStaffMembers')
28
+ total_cost: int = HTField('TotalCost')
29
+
30
+
31
+ class Trainer(HTModel):
32
+ """
33
+ Staff List -> Trainer
34
+ """
35
+ id: int = HTField('TrainerId')
36
+ name: str = HTField('Name')
37
+ age: int = HTField('Age')
38
+ age_days: int = HTField('AgeDays')
39
+ contract_date: datetime = HTField('ContractDate')
40
+ cost: int = HTField('Cost')
41
+ country_id: int = HTField('CountryID')
42
+ type: int = HTField('TrainerType')
43
+ leadership: int = HTField('Leadership')
44
+ skill_level: int = HTField('TrainerSkillLevel')
45
+ status: int = HTField('TrainerStatus')
46
+
47
+
48
+ class StaffMemberItem(HTModel):
49
+ """
50
+ Staff List -> Staff members -> Staff member item
51
+ """
52
+ id: int = HTField('StaffId')
53
+ name: str = HTField('Name')
54
+ type: int = HTField('StaffType')
55
+ level: int = HTField('StaffLevel')
56
+ hired_date: datetime = HTField('HiredDate')
57
+ cost: int = HTField('Cost')
58
+ hof_player_id: int = HTField('HofPlayerId')
@@ -0,0 +1,104 @@
1
+ from datetime import datetime
2
+ from typing import Optional, List
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestSupporters(HTModel):
10
+ """
11
+ Supporters - Request arguments
12
+ """
13
+ SOURCE_FILE = 'supporters'
14
+ LAST_VERSION = '1.0'
15
+
16
+ _r_action_type: Optional[str] = HTInitVar('actionType', init_arg='action_type')
17
+ _r_user_id: Optional[int] = HTInitVar('userId', init_arg='user_id')
18
+ _r_team_id: Optional[int] = HTInitVar('teamId', init_arg='team_id')
19
+ _r_page_index: Optional[int] = HTInitVar('pageIndex', init_arg='page_index')
20
+ _r_page_size: Optional[int] = HTInitVar('pageSize', init_arg='page_size')
21
+
22
+
23
+ class SupportersSupportedTeams(RequestSupporters):
24
+ """
25
+ Supporters - Supported teams
26
+ """
27
+ total_supported_teams: int = HTField('SupportedTeams', attrib='TotalItems')
28
+ supported_teams: List['SupportedTeamItem'] = HTField('SupportedTeams', items='SupportedTeam')
29
+
30
+
31
+ class SupportersMySupporters(RequestSupporters):
32
+ """
33
+ Supporters - My supporters
34
+ """
35
+ total_supporters: int = HTField('MySupporters', attrib='TotalItems')
36
+ my_supporters: List['MySupportersTeamItem'] = HTField('MySupporters', items='SupporterTeam')
37
+
38
+
39
+ class CommonTeamItem(HTModel):
40
+ """
41
+ Supporters - Supported teams/My Supporters -> Supported teams/My Supporters -> Team item
42
+ """
43
+ user_id: int = HTField('UserId')
44
+ login_name: str = HTField('LoginName')
45
+ team_id: int = HTField('TeamId')
46
+ team_name: str = HTField('TeamName')
47
+ league_id: int = HTField('LeagueID')
48
+ league_name: str = HTField('LeagueName')
49
+ league_level_unit_id: int = HTField('LeagueLevelUnitID')
50
+ league_level_unit_name: str = HTField('LeagueLevelUnitName')
51
+
52
+
53
+ class SupportedTeamItem(CommonTeamItem):
54
+ """
55
+ Supporters - Supported teams -> Supported teams -> Team item
56
+ """
57
+ last_match: 'LastMatch' = HTField('LastMatch')
58
+ next_match: 'NextMatch' = HTField('NextMatch')
59
+ press_announcement: Optional['PressAnnouncement'] = HTField('PressAnnouncement')
60
+
61
+
62
+ class MySupportersTeamItem(CommonTeamItem):
63
+ """
64
+ Supporters - Supported teams -> My Supporters -> Team item
65
+ """
66
+
67
+
68
+ class CommonLastNextMatch(HTModel):
69
+ """
70
+ Supporters - Supported teams -> Supported teams -> Team item -> Last/Next match
71
+ """
72
+ id: int = HTField('Id')
73
+ date: datetime = HTField('Date')
74
+ home_team_id: int = HTField('HomeTeamId')
75
+ home_team_name: str = HTField('HomeTeamName')
76
+ away_team_id: int = HTField('AwayTeamId')
77
+ away_team_name: str = HTField('AwayTeamName')
78
+
79
+
80
+ class LastMatch(CommonLastNextMatch):
81
+ """
82
+ Supporters - Supported teams -> Supported teams -> Team item -> Last match
83
+ """
84
+ XML_PREFIX = 'LastMatch'
85
+ home_goals: int = HTField('HomeGoals')
86
+ away_goals: int = HTField('AwayGoals')
87
+
88
+
89
+ class NextMatch(CommonLastNextMatch):
90
+ """
91
+ Supporters - Supported teams -> Supported teams -> Team item -> Next match
92
+ """
93
+ XML_PREFIX = 'NextMatch'
94
+ date: datetime = HTField('MatchDate')
95
+
96
+
97
+ class PressAnnouncement(HTModel):
98
+ """
99
+ Supporters - Supported teams -> Supported teams -> Team item -> Press Announcement
100
+ """
101
+ XML_PREFIX = 'PressAnnouncement'
102
+ send_date: datetime = HTField('SendDate')
103
+ subject: str = HTField('Subject')
104
+ body: str = HTField('Body')
@@ -0,0 +1,46 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestTournamentDetails(HTModel):
10
+ """
11
+ Tournament Details - Request arguments
12
+ """
13
+ SOURCE_FILE = 'tournamentdetails'
14
+ LAST_VERSION = '1.0'
15
+
16
+ _r_tournament_id: int = HTInitVar('tournamentId', init_arg='tournament_id')
17
+ _r_season: Optional[int] = HTInitVar('season', init_arg='season')
18
+
19
+
20
+ class TournamentDetails(RequestTournamentDetails):
21
+ """
22
+ Tournament Details
23
+ """
24
+ XML_PREFIX = 'Tournament/'
25
+
26
+ id: int = HTField('TournamentId')
27
+ name: str = HTField('Name')
28
+ type: int = HTField('TournamentType')
29
+ season: int = HTField('Season')
30
+ logo_url: str = HTField('LogoUrl')
31
+ trophy_type: int = HTField('TrophyType')
32
+ number_of_teams: int = HTField('NumberOfTeams')
33
+ number_of_groups: int = HTField('NumberOfGroups')
34
+ last_match_round: int = HTField('LastMatchRound')
35
+ first_match_round_date: datetime = HTField('FirstMatchRoundDate')
36
+ next_match_round_date: datetime = HTField('NextMatchRoundDate')
37
+ is_matches_ongoing: bool = HTField('IsMatchesOngoing')
38
+ creator: 'Creator' = HTField('Creator')
39
+
40
+
41
+ class Creator(HTModel):
42
+ """
43
+ Tournament Details -> Creator
44
+ """
45
+ id: int = HTField('UserId')
46
+ login_name: str = HTField('Loginname')
@@ -0,0 +1,46 @@
1
+ from datetime import datetime
2
+ from typing import Optional, List
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestTournamentFixtures(HTModel):
10
+ """
11
+ Tournament Fixtures - Request arguments
12
+ """
13
+ SOURCE_FILE = 'tournamentfixtures'
14
+ LAST_VERSION = '1.0'
15
+
16
+ _r_tournament_id: int = HTInitVar('tournamentId', init_arg='tournament_id')
17
+ _r_season: Optional[int] = HTInitVar('season', init_arg='season')
18
+
19
+
20
+ class TournamentFixtures(RequestTournamentFixtures):
21
+ """
22
+ Tournament Fixtures
23
+ """
24
+ matches: List['MatchItem'] = HTField('Matches', items='Match')
25
+
26
+
27
+ class MatchItem(HTModel):
28
+ """
29
+ Tournament Fixtures -> Matches -> Match item
30
+ """
31
+ id: int = HTField('MatchId')
32
+ home_team_id: int = HTField('HomeTeamId')
33
+ home_team_name: str = HTField('HomeTeamName')
34
+ home_short_team_name: str = HTField('HomeShortTeamName')
35
+ away_team_id: int = HTField('AwayTeamId')
36
+ away_team_name: str = HTField('AwayTeamName')
37
+ away_short_team_name: str = HTField('AwayShortTeamName')
38
+ date: datetime = HTField('MatchDate')
39
+ type: int = HTField('MatchType')
40
+ round: int = HTField('MatchRound')
41
+ group: int = HTField('Group')
42
+ status: int = HTField('Status')
43
+ home_goals: int = HTField('HomeGoals')
44
+ away_goals: int = HTField('AwayGoals')
45
+ home_statement: str = HTField('HomeStatement')
46
+ away_statement: str = HTField('AwayStatement')
@@ -0,0 +1,54 @@
1
+ from typing import Optional, List
2
+
3
+ from pychpp.models.ht_field import HTField
4
+ from pychpp.models.ht_init_var import HTInitVar
5
+ from pychpp.models.ht_model import HTModel
6
+
7
+
8
+ class RequestTournamentLeagueTables(HTModel):
9
+ """
10
+ Tournament League Tables - Request arguments
11
+ """
12
+ SOURCE_FILE = 'tournamentleaguetables'
13
+ LAST_VERSION = '1.1'
14
+
15
+ _r_tournament_id: int = HTInitVar('tournamentId', init_arg='tournament_id')
16
+ _r_season: Optional[int] = HTInitVar('season', init_arg='season')
17
+ _r_world_cup_round: Optional[int] = HTInitVar('worldCupRound', init_arg='world_cup_round')
18
+
19
+
20
+ class TournamentLeagueTables(RequestTournamentLeagueTables):
21
+ """
22
+ Tournament League Tables
23
+ """
24
+ id: int = HTField('TournamentId')
25
+ season: int = HTField('Season')
26
+ world_cup_round: Optional[int] = HTField('WorldCupRound')
27
+ tournament_league_tables: List['TableItem'] = HTField('TournamentLeagueTables',
28
+ items='TournamentLeagueTable')
29
+
30
+
31
+ class TableItem(HTModel):
32
+ """
33
+ Tournament League Tables -> Tournament League Tables -> Tournament League Table item
34
+ """
35
+ group_id: int = HTField('GroupId')
36
+ teams: List['TeamItem'] = HTField('Teams', items='Team')
37
+
38
+
39
+ class TeamItem(HTModel):
40
+ """
41
+ Tournament League Tables -> Tournament League Tables -> Tournament League Table item
42
+ -> Teams -> Team item
43
+ """
44
+ id: int = HTField('TeamID')
45
+ name: str = HTField('TeamName')
46
+ position: int = HTField('Position')
47
+ position_change: int = HTField('PositionChange')
48
+ matches: int = HTField('Matches')
49
+ goals_for: int = HTField('GoalsFor')
50
+ goals_against: int = HTField('GoalsAgainst')
51
+ points: int = HTField('Points')
52
+ won: int = HTField('Won')
53
+ draws: int = HTField('Draws')
54
+ lost: int = HTField('Lost')
@@ -0,0 +1,50 @@
1
+ from datetime import datetime
2
+ from typing import List, Optional
3
+
4
+ from pychpp.models.ht_field import HTField
5
+ from pychpp.models.ht_init_var import HTInitVar
6
+ from pychpp.models.ht_model import HTModel
7
+
8
+
9
+ class RequestTournamentList(HTModel):
10
+ """
11
+ Tournament List - Request arguments
12
+ """
13
+ SOURCE_FILE = 'tournamentlist'
14
+ LAST_VERSION = '1.0'
15
+
16
+ _r_team_id: Optional[int] = HTInitVar('teamId', init_arg='team_id')
17
+
18
+
19
+ class TournamentList(RequestTournamentList):
20
+ """
21
+ Tournament List
22
+ """
23
+ tournaments: List['TournamentItem'] = HTField('Tournaments', items='Tournament')
24
+
25
+
26
+ class TournamentItem(HTModel):
27
+ """
28
+ Tournament List -> Tournaments -> Tournament item
29
+ """
30
+ id: int = HTField('TournamentId')
31
+ name: str = HTField('Name')
32
+ type: int = HTField('TournamentType')
33
+ season: int = HTField('Season')
34
+ logo_url: str = HTField('LogoUrl')
35
+ trophy_type: int = HTField('TrophyType')
36
+ number_of_teams: int = HTField('NumberOfTeams')
37
+ number_of_groups: int = HTField('NumberOfGroups')
38
+ last_match_round: int = HTField('LastMatchRound')
39
+ first_match_round_date: datetime = HTField('FirstMatchRoundDate')
40
+ next_match_round_date: datetime = HTField('NextMatchRoundDate')
41
+ is_matches_ongoing: bool = HTField('IsMatchesOngoing')
42
+ creator: 'Creator' = HTField('Creator')
43
+
44
+
45
+ class Creator(HTModel):
46
+ """
47
+ Tournament Details -> Creator
48
+ """
49
+ id: int = HTField('UserId')
50
+ login_name: str = HTField('Loginname')
@@ -0,0 +1,46 @@
1
+ from typing import List
2
+
3
+ from pychpp.models.ht_field import HTField
4
+ from pychpp.models.ht_init_var import HTInitVar
5
+ from pychpp.models.ht_model import HTModel
6
+
7
+
8
+ class RequestTrainingEvents(HTModel):
9
+ """
10
+ Training Events - Request arguments
11
+ """
12
+ SOURCE_FILE = 'trainingevents'
13
+ LAST_VERSION = '1.3'
14
+
15
+ _r_player_id: int = HTInitVar('playerID', init_arg='player_id')
16
+
17
+
18
+ class TrainingEvents(RequestTrainingEvents):
19
+ """
20
+ Training Events
21
+ """
22
+ user_supporter_tier: str = HTField('UserSupporterTier')
23
+ player: 'Player' = HTField('Player')
24
+
25
+
26
+ class Player(HTModel):
27
+ """
28
+ Training Events -> Player
29
+ """
30
+ id: int = HTField('PlayerID')
31
+ training_events_available: bool = HTField('TrainingEvents', attrib='Available')
32
+ training_events: List['TrainingEventItem'] = HTField('TrainingEvents',
33
+ items='TrainingEvent')
34
+
35
+
36
+ class TrainingEventItem(HTModel):
37
+ """
38
+ Training Events -> Player -> Training Events -> Training event item
39
+ """
40
+ index: int = HTField('.', attrib='Index')
41
+ skill_id: int = HTField('SkillID')
42
+ old_level: int = HTField('OldLevel')
43
+ new_level: int = HTField('NewLevel')
44
+ season: int = HTField('Season')
45
+ match_round: int = HTField('MatchRound')
46
+ day_number: int = HTField('DayNumber')
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pychpp"
3
- version = "0.4.6"
3
+ version = "0.4.8"
4
4
  description = "framework created to use the API provided by the online game Hattrick"
5
5
  license = "Apache-2.0"
6
6
  authors = ["Pierre Gobin <p.dev@gobin.cc>"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes