pychpp 0.5.9__tar.gz → 0.6.0__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 (102) hide show
  1. {pychpp-0.5.9 → pychpp-0.6.0}/PKG-INFO +64 -61
  2. {pychpp-0.5.9 → pychpp-0.6.0}/README.md +63 -60
  3. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/chpp.py +61 -12
  4. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/fixtures/ht_error.py +4 -0
  5. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_team.py +2 -2
  6. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_match_lineup.py +1 -1
  7. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/ht_model.py +1 -1
  8. pychpp-0.6.0/pychpp/models/xml/achievements.py +55 -0
  9. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/alliances.py +3 -2
  10. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/hof_players.py +8 -2
  11. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/live.py +6 -5
  12. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/manager_compendium.py +7 -4
  13. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/match_details.py +77 -1
  14. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/match_lineup.py +2 -2
  15. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/matches.py +4 -1
  16. pychpp-0.6.0/pychpp/models/xml/national_prospect_players.py +55 -0
  17. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/national_team_details.py +20 -2
  18. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/player_details.py +35 -2
  19. pychpp-0.6.0/pychpp/models/xml/player_stats.py +90 -0
  20. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/players.py +4 -1
  21. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/staff_list.py +2 -1
  22. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/supporters.py +5 -1
  23. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/team_details.py +12 -1
  24. pychpp-0.6.0/pychpp/models/xml/team_history.py +71 -0
  25. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/tournament_fixtures.py +2 -1
  26. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/training.py +30 -1
  27. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/transfer_search.py +7 -1
  28. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/world_details.py +6 -1
  29. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_league_details.py +2 -1
  30. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_player_details.py +16 -1
  31. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_player_list.py +3 -1
  32. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_team_details.py +6 -3
  33. {pychpp-0.5.9 → pychpp-0.6.0}/pyproject.toml +1 -1
  34. pychpp-0.5.9/pychpp/models/xml/achievements.py +0 -37
  35. {pychpp-0.5.9 → pychpp-0.6.0}/LICENSE +0 -0
  36. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/__init__.py +0 -0
  37. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/fixtures/__init__.py +0 -0
  38. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/fixtures/ht_datetime.py +0 -0
  39. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/__init__.py +0 -0
  40. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/__init__.py +0 -0
  41. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/__init__.py +0 -0
  42. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_arena.py +0 -0
  43. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_country.py +0 -0
  44. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_league.py +0 -0
  45. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_league_unit.py +0 -0
  46. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_match.py +0 -0
  47. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_player.py +0 -0
  48. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_region.py +0 -0
  49. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/base/ht_user.py +0 -0
  50. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_arena.py +0 -0
  51. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_challenge.py +0 -0
  52. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_league.py +0 -0
  53. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_league_unit.py +0 -0
  54. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_match.py +0 -0
  55. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_matches_archive.py +0 -0
  56. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_player.py +0 -0
  57. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_region.py +0 -0
  58. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_team.py +0 -0
  59. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_transfer_history.py +0 -0
  60. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_user.py +0 -0
  61. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_youth_player.py +0 -0
  62. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/custom/ht_youth_team.py +0 -0
  63. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/ht_field.py +0 -0
  64. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/ht_init_var.py +0 -0
  65. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/ht_version.py +0 -0
  66. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/ht_xml.py +0 -0
  67. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/__init__.py +0 -0
  68. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/alliance_details.py +0 -0
  69. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/arena_details.py +0 -0
  70. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/avatars.py +0 -0
  71. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/bookmarks.py +0 -0
  72. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/challenges.py +0 -0
  73. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/club.py +0 -0
  74. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/cup_matches.py +0 -0
  75. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/current_bids.py +0 -0
  76. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/economy.py +0 -0
  77. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/fans.py +0 -0
  78. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/ladder_details.py +0 -0
  79. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/ladder_list.py +0 -0
  80. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/league_details.py +0 -0
  81. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/league_fixtures.py +0 -0
  82. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/league_levels.py +0 -0
  83. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/match_orders.py +0 -0
  84. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/matches_archive.py +0 -0
  85. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/national_players.py +0 -0
  86. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/national_team_matches.py +0 -0
  87. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/national_teams.py +0 -0
  88. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/player_events.py +0 -0
  89. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/region_details.py +0 -0
  90. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/search.py +0 -0
  91. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/staff_avatars.py +0 -0
  92. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/tournament_details.py +0 -0
  93. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/tournament_league_tables.py +0 -0
  94. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/tournament_list.py +0 -0
  95. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/training_events.py +0 -0
  96. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/transfers_player.py +0 -0
  97. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/transfers_team.py +0 -0
  98. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/translations.py +0 -0
  99. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/world_cup.py +0 -0
  100. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/world_languages.py +0 -0
  101. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_avatars.py +0 -0
  102. {pychpp-0.5.9 → pychpp-0.6.0}/pychpp/models/xml/youth_league_fixtures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pychpp
3
- Version: 0.5.9
3
+ Version: 0.6.0
4
4
  Summary: framework created to use the API provided by the online game Hattrick
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -166,69 +166,72 @@ Then, to use this new class:
166
166
  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.
167
167
 
168
168
  ## List of supported CHPP XML files
169
- ![57/57](https://progress-bar.xyz/100/?title=57%20on%2057)
169
+ ![60/60](https://progress-bar.xyz/100/?title=60%20on%2060)
170
170
 
171
171
  The following table shows the CHPP XML files that are currently supported:
172
172
 
173
- | pyCHPP class | CHPP XML files |
174
- |:----------------------:|:----------------------------:|
175
- | Achievements | `achievements.xml` |
176
- | Alliances | `alliances.xml` |
177
- | AllianceDetails | `alliancedetails.xml` |
178
- | Arena | `arenadetails.xml` |
179
- | Avatars | `avatars.xml` |
180
- | Bookmarks | `bookmarks.xml` |
181
- | Challenges | `challenges.xml` |
182
- | Club | `club.xml` |
183
- | CupMatches | `cupmatches.xml` |
184
- | CurrentBids | `currentbids.xml` |
185
- | Economy | `economy.xml` |
186
- | Fans | `fans.xml` |
187
- | HallOfFamePlayers | `hofplayers.xml` |
188
- | LadderDetails | `ladderdetails.xml` |
189
- | LadderList | `ladderlist.xml` |
190
- | LeagueDetails | `leaguedetails.xml` |
191
- | LeagueFixtures | `leaguefixtures.xml` |
192
- | LeagueLevels | `leaguelevels.xml` |
193
- | Live | `live.xml` |
194
- | ManagerCompendium | `managercompendium.xml` |
195
- | MatchDetails | `matchdetails.xml` |
196
- | MatchLineup | `matchlineup.xml` |
197
- | MatchOrders | `matchorders.xml` |
198
- | MatchesArchive | `matchesarchive.xml` |
199
- | Matches | `matches.xml` |
200
- | NationalTeamDetails | `nationalteamdetails.xml` |
201
- | NationalTeamMatches | `nationalteammatches.xml` |
202
- | NationalTeams | `nationalteams.xml` |
203
- | NationalPlayers | `nationalplayers.xml` |
204
- | PlayerDetails | `playerdetails.xml` |
205
- | PlayerEvents | `playerevents.xml` |
206
- | Players | `players.xml` |
207
- | RegionDetails | `regiondetails.xml` |
208
- | Search | `search.xml` |
209
- | StaffAvatars | `staffavatars.xml` |
210
- | StaffList | `stafflist.xml` |
211
- | Supporters | `supporters.xml` |
212
- | TeamDetails | `teamdetails.xml` |
213
- | TournamentDetails | `tournamentdetails.xml` |
214
- | TournamentFixtures | `tournamentfixtures.xml` |
215
- | TournamentLeagueTables | `tournamentleaguetables.xml` |
216
- | TournamentList | `tournamentlist.xml` |
217
- | Training | `training.xml` |
218
- | TrainingEvents | `trainingevents.xml` |
219
- | TransferSearch | `transfersearch.xml` |
220
- | TransfersPlayer | `transfersplayer.xml` |
221
- | TransfersTeam | `transfersteam.xml` |
222
- | Translations | `translations.xml` |
223
- | WorldCup | `worldcup.xml` |
224
- | WorldDetails | `worlddetails.xml` |
225
- | WorldLanguages | `worldlanguages.xml` |
226
- | YouthAvatars | `youthavatars.xml` |
227
- | YouthLeagueDetails | `youthleaguedetails.xml` |
228
- | YouthLeagueFixtures | `youthleaguefixtures.xml` |
229
- | YouthPlayerDetails | `youthplayerdetails.xml` |
230
- | YouthPlayerList | `youthplayerlist.xml` |
231
- | YouthTeamDetails | `youthteamdetails.xml` |
173
+ | pyCHPP class | CHPP XML files |
174
+ |:------------------------|:------------------------------|
175
+ | Achievements | `achievements.xml` |
176
+ | Alliances | `alliances.xml` |
177
+ | AllianceDetails | `alliancedetails.xml` |
178
+ | Arena | `arenadetails.xml` |
179
+ | Avatars | `avatars.xml` |
180
+ | Bookmarks | `bookmarks.xml` |
181
+ | Challenges | `challenges.xml` |
182
+ | Club | `club.xml` |
183
+ | CupMatches | `cupmatches.xml` |
184
+ | CurrentBids | `currentbids.xml` |
185
+ | Economy | `economy.xml` |
186
+ | Fans | `fans.xml` |
187
+ | HallOfFamePlayers | `hofplayers.xml` |
188
+ | LadderDetails | `ladderdetails.xml` |
189
+ | LadderList | `ladderlist.xml` |
190
+ | LeagueDetails | `leaguedetails.xml` |
191
+ | LeagueFixtures | `leaguefixtures.xml` |
192
+ | LeagueLevels | `leaguelevels.xml` |
193
+ | Live | `live.xml` |
194
+ | ManagerCompendium | `managercompendium.xml` |
195
+ | MatchDetails | `matchdetails.xml` |
196
+ | MatchLineup | `matchlineup.xml` |
197
+ | MatchOrders | `matchorders.xml` |
198
+ | MatchesArchive | `matchesarchive.xml` |
199
+ | Matches | `matches.xml` |
200
+ | NationalTeamDetails | `nationalteamdetails.xml` |
201
+ | NationalTeamMatches | `nationalteammatches.xml` |
202
+ | NationalTeams | `nationalteams.xml` |
203
+ | NationalPlayers | `nationalplayers.xml` |
204
+ | NationalProspectPlayers | `nationalprospectplayers.xml` |
205
+ | PlayerDetails | `playerdetails.xml` |
206
+ | PlayerEvents | `playerevents.xml` |
207
+ | Players | `players.xml` |
208
+ | PlayerStats | `playerstats.xml` |
209
+ | RegionDetails | `regiondetails.xml` |
210
+ | Search | `search.xml` |
211
+ | StaffAvatars | `staffavatars.xml` |
212
+ | StaffList | `stafflist.xml` |
213
+ | Supporters | `supporters.xml` |
214
+ | TeamDetails | `teamdetails.xml` |
215
+ | TeamHistory | `teamhistory.xml` |
216
+ | TournamentDetails | `tournamentdetails.xml` |
217
+ | TournamentFixtures | `tournamentfixtures.xml` |
218
+ | TournamentLeagueTables | `tournamentleaguetables.xml` |
219
+ | TournamentList | `tournamentlist.xml` |
220
+ | Training | `training.xml` |
221
+ | TrainingEvents | `trainingevents.xml` |
222
+ | TransferSearch | `transfersearch.xml` |
223
+ | TransfersPlayer | `transfersplayer.xml` |
224
+ | TransfersTeam | `transfersteam.xml` |
225
+ | Translations | `translations.xml` |
226
+ | WorldCup | `worldcup.xml` |
227
+ | WorldDetails | `worlddetails.xml` |
228
+ | WorldLanguages | `worldlanguages.xml` |
229
+ | YouthAvatars | `youthavatars.xml` |
230
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
231
+ | YouthLeagueFixtures | `youthleaguefixtures.xml` |
232
+ | YouthPlayerDetails | `youthplayerdetails.xml` |
233
+ | YouthPlayerList | `youthplayerlist.xml` |
234
+ | YouthTeamDetails | `youthteamdetails.xml` |
232
235
 
233
236
  ## License
234
237
  pyCHPP is licensed under the Apache License 2.0.
@@ -143,69 +143,72 @@ 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
- ![57/57](https://progress-bar.xyz/100/?title=57%20on%2057)
146
+ ![60/60](https://progress-bar.xyz/100/?title=60%20on%2060)
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
- | 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
- | TransferSearch | `transfersearch.xml` |
197
- | TransfersPlayer | `transfersplayer.xml` |
198
- | TransfersTeam | `transfersteam.xml` |
199
- | Translations | `translations.xml` |
200
- | WorldCup | `worldcup.xml` |
201
- | WorldDetails | `worlddetails.xml` |
202
- | WorldLanguages | `worldlanguages.xml` |
203
- | YouthAvatars | `youthavatars.xml` |
204
- | YouthLeagueDetails | `youthleaguedetails.xml` |
205
- | YouthLeagueFixtures | `youthleaguefixtures.xml` |
206
- | YouthPlayerDetails | `youthplayerdetails.xml` |
207
- | YouthPlayerList | `youthplayerlist.xml` |
208
- | 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
+ | NationalProspectPlayers | `nationalprospectplayers.xml` |
182
+ | PlayerDetails | `playerdetails.xml` |
183
+ | PlayerEvents | `playerevents.xml` |
184
+ | Players | `players.xml` |
185
+ | PlayerStats | `playerstats.xml` |
186
+ | RegionDetails | `regiondetails.xml` |
187
+ | Search | `search.xml` |
188
+ | StaffAvatars | `staffavatars.xml` |
189
+ | StaffList | `stafflist.xml` |
190
+ | Supporters | `supporters.xml` |
191
+ | TeamDetails | `teamdetails.xml` |
192
+ | TeamHistory | `teamhistory.xml` |
193
+ | TournamentDetails | `tournamentdetails.xml` |
194
+ | TournamentFixtures | `tournamentfixtures.xml` |
195
+ | TournamentLeagueTables | `tournamentleaguetables.xml` |
196
+ | TournamentList | `tournamentlist.xml` |
197
+ | Training | `training.xml` |
198
+ | TrainingEvents | `trainingevents.xml` |
199
+ | TransferSearch | `transfersearch.xml` |
200
+ | TransfersPlayer | `transfersplayer.xml` |
201
+ | TransfersTeam | `transfersteam.xml` |
202
+ | Translations | `translations.xml` |
203
+ | WorldCup | `worldcup.xml` |
204
+ | WorldDetails | `worlddetails.xml` |
205
+ | WorldLanguages | `worldlanguages.xml` |
206
+ | YouthAvatars | `youthavatars.xml` |
207
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
208
+ | YouthLeagueFixtures | `youthleaguefixtures.xml` |
209
+ | YouthPlayerDetails | `youthplayerdetails.xml` |
210
+ | YouthPlayerList | `youthplayerlist.xml` |
211
+ | YouthTeamDetails | `youthteamdetails.xml` |
209
212
 
210
213
  ## License
211
214
  pyCHPP is licensed under the Apache License 2.0.
@@ -8,7 +8,8 @@ from requests.adapters import HTTPAdapter
8
8
  from requests_oauthlib import OAuth1Session
9
9
  from urllib3 import Retry
10
10
 
11
- from pychpp.models.xml import (manager_compendium, team_details, achievements, arena_details,
11
+ from pychpp.models.xml import (manager_compendium, team_details, team_history, achievements,
12
+ arena_details,
12
13
  challenges, region_details, league_details, league_fixtures,
13
14
  match_lineup, national_teams, national_team_details, player_details,
14
15
  training, transfers_team, world_details, world_cup, players,
@@ -17,7 +18,8 @@ from pychpp.models.xml import (manager_compendium, team_details, achievements, a
17
18
  alliance_details, avatars, bookmarks, club, current_bids, economy,
18
19
  fans, hof_players, ladder_details, ladder_list, league_levels, live,
19
20
  matches, match_orders, national_team_matches, national_players,
20
- player_events, search, staff_avatars, staff_list, supporters,
21
+ national_prospect_players, player_events, player_stats, search,
22
+ staff_avatars, staff_list, supporters,
21
23
  tournament_details, tournament_fixtures, tournament_league_tables,
22
24
  tournament_list, training_events, transfer_search, transfers_player,
23
25
  world_languages, youth_avatars, youth_league_details,
@@ -89,6 +91,11 @@ class CHPPBase:
89
91
 
90
92
  error_code = int(xml_data.find("ErrorCode").text)
91
93
 
94
+ if error_code == 1:
95
+ raise ht_error.HTAccessDeniedError(
96
+ "Access to specified parameters or file was denied : "
97
+ + xml_data.find("Error").text)
98
+
92
99
  if error_code == 50:
93
100
  raise ht_error.HTUnknownTeamIdError(
94
101
  "The requested team id is unknown")
@@ -389,9 +396,9 @@ class CHPPBase:
389
396
 
390
397
  class CHPPXml(CHPPBase):
391
398
 
392
- def xml_achievements(self, user_id: int = None) -> achievements.Achievements:
399
+ def xml_achievements(self, user_id: int = None, **kwargs) -> achievements.Achievements:
393
400
 
394
- return achievements.Achievements(chpp=self, user_id=user_id)
401
+ return achievements.Achievements(chpp=self, user_id=user_id, **kwargs)
395
402
 
396
403
  def xml_alliances(
397
404
  self,
@@ -399,6 +406,7 @@ class CHPPXml(CHPPBase):
399
406
  search_type: int = None,
400
407
  search_language_id: int = None,
401
408
  page_index: int = None,
409
+ user_id: int = None,
402
410
  **kwargs,
403
411
  ) -> alliances.Alliances:
404
412
 
@@ -408,6 +416,7 @@ class CHPPXml(CHPPBase):
408
416
  search_for=search_for,
409
417
  search_language_id=search_language_id,
410
418
  page_index=page_index,
419
+ user_id=user_id,
411
420
  **kwargs,
412
421
  )
413
422
 
@@ -801,6 +810,14 @@ class CHPPXml(CHPPBase):
801
810
  raise ValueError("if set, 'action_type' must be equal to"
802
811
  "'view', 'setmatchorder' or 'SupporterStats'")
803
812
 
813
+ def xml_national_prospect_players(
814
+ self, team_id: int, player_category_id: int = None, **kwargs,
815
+ ) -> national_prospect_players.NationalProspectPlayers:
816
+
817
+ return national_prospect_players.NationalProspectPlayers(
818
+ chpp=self, team_id=team_id, player_category_id=player_category_id, **kwargs,
819
+ )
820
+
804
821
  def xml_player_events(
805
822
  self, player_id: int = None, **kwargs,
806
823
  ) -> player_events.PlayerEvents:
@@ -809,6 +826,14 @@ class CHPPXml(CHPPBase):
809
826
  chpp=self, player_id=player_id, **kwargs,
810
827
  )
811
828
 
829
+ def xml_player_stats(
830
+ self, player_id: int = None, **kwargs,
831
+ ) -> player_stats.PlayerStats:
832
+
833
+ return player_stats.PlayerStats(
834
+ chpp=self, player_id=player_id, **kwargs,
835
+ )
836
+
812
837
  def xml_players(self, action_type: str = 'view', order_by: str = None,
813
838
  team_id: int = None, include_match_info: bool = None, **kwargs,
814
839
  ) -> Union[players.PlayersView,
@@ -886,19 +911,22 @@ class CHPPXml(CHPPBase):
886
911
 
887
912
  def xml_supporters(
888
913
  self, action_type: str = 'supportedteams',
889
- user_id: int = None, team_id: int = None, **kwargs,
914
+ user_id: int = None, team_id: int = None,
915
+ page_index: int = None, page_size: int = None, **kwargs,
890
916
  ) -> Union[supporters.SupportersSupportedTeams,
891
917
  supporters.SupportersMySupporters,
892
918
  ]:
893
919
 
894
920
  if action_type == 'supportedteams':
895
921
  return supporters.SupportersSupportedTeams(
896
- chpp=self, action_type=action_type, user_id=user_id, **kwargs,
922
+ chpp=self, action_type=action_type, user_id=user_id,
923
+ page_index=page_index, page_size=page_size, **kwargs,
897
924
  )
898
925
 
899
926
  elif action_type == 'mysupporters':
900
927
  return supporters.SupportersMySupporters(
901
- chpp=self, action_type=action_type, team_id=team_id, **kwargs,
928
+ chpp=self, action_type=action_type, team_id=team_id,
929
+ page_index=page_index, page_size=page_size, **kwargs,
902
930
  )
903
931
 
904
932
  else:
@@ -918,6 +946,14 @@ class CHPPXml(CHPPBase):
918
946
  ** kwargs,
919
947
  )
920
948
 
949
+ def xml_team_history(
950
+ self, team_id: int = None, **kwargs,
951
+ ) -> team_history.TeamHistory:
952
+
953
+ return team_history.TeamHistory(
954
+ chpp=self, team_id=team_id, **kwargs,
955
+ )
956
+
921
957
  def xml_tournament_details(
922
958
  self, tournament_id: int, season: int = None, **kwargs,
923
959
  ) -> tournament_details.TournamentDetails:
@@ -927,11 +963,12 @@ class CHPPXml(CHPPBase):
927
963
  )
928
964
 
929
965
  def xml_tournament_fixtures(
930
- self, tournament_id: int, season: int = None, **kwargs,
966
+ self, tournament_id: int, season: int = None, match_round: int = None, **kwargs,
931
967
  ) -> tournament_fixtures.TournamentFixtures:
932
968
 
933
969
  return tournament_fixtures.TournamentFixtures(
934
- chpp=self, tournament_id=tournament_id, season=season, **kwargs,
970
+ chpp=self, tournament_id=tournament_id, season=season,
971
+ match_round=match_round, **kwargs,
935
972
  )
936
973
 
937
974
  def xml_tournament_league_tables(
@@ -955,10 +992,11 @@ class CHPPXml(CHPPBase):
955
992
  self, action_type: str = 'view', team_id: int = None,
956
993
  training_type: int = None, training_level: int = None,
957
994
  training_level_stamina: int = None, league_id: int = None,
958
- **kwargs,
995
+ from_date: datetime = None, **kwargs,
959
996
  ) -> Union[training.TrainingView,
960
997
  training.TrainingSetTraining,
961
- training.TrainingStats]:
998
+ training.TrainingStats,
999
+ training.TrainingHistoryView]:
962
1000
 
963
1001
  if action_type == 'view':
964
1002
  return training.TrainingView(
@@ -979,9 +1017,15 @@ class CHPPXml(CHPPBase):
979
1017
  training_level_stamina=training_level_stamina, **kwargs,
980
1018
  )
981
1019
 
1020
+ elif action_type == 'history':
1021
+ return training.TrainingHistoryView(
1022
+ chpp=self, action_type=action_type, team_id=team_id,
1023
+ from_date=from_date, **kwargs,
1024
+ )
1025
+
982
1026
  else:
983
1027
  raise ValueError("if set, 'action_type' must be equal to"
984
- "'view', 'setTraining' or 'stats'")
1028
+ "'view', 'setTraining', 'stats' or 'history'")
985
1029
 
986
1030
  def xml_training_events(
987
1031
  self, player_id: int, **kwargs,
@@ -999,6 +1043,8 @@ class CHPPXml(CHPPBase):
999
1043
  skill_type_4: int = None, min_skill_value_4: int = None, max_skill_value_4: int = None,
1000
1044
  specialty: int = None, native_country_id: int = None,
1001
1045
  tsi_min: int = None, tsi_max: int = None, price_min: int = None, price_max: int = None,
1046
+ salary_min: int = None, salary_max: int = None,
1047
+ transfer_compare_avg_min: int = None, transfer_compare_avg_max: int = None,
1002
1048
  page_size: int = None, page_index: int = None, **kwargs,
1003
1049
  ) -> transfer_search.TransferSearch:
1004
1050
 
@@ -1016,6 +1062,9 @@ class CHPPXml(CHPPBase):
1016
1062
  min_skill_value_4=min_skill_value_4, max_skill_value_4=max_skill_value_4,
1017
1063
  specialty=specialty, native_country_id=native_country_id,
1018
1064
  tsi_min=tsi_min, tsi_max=tsi_max, price_min=price_min, price_max=price_max,
1065
+ salary_min=salary_min, salary_max=salary_max,
1066
+ transfer_compare_avg_min=transfer_compare_avg_min,
1067
+ transfer_compare_avg_max=transfer_compare_avg_max,
1019
1068
  page_size=page_size, page_index=page_index, **kwargs,
1020
1069
  )
1021
1070
 
@@ -67,6 +67,10 @@ class HTUnauthorizedAction(HTError):
67
67
  """Raise when CHPP request returns a 401 error code"""
68
68
 
69
69
 
70
+ class HTAccessDeniedError(HTError):
71
+ """Raise when Hattrick denies access to a parameter or file (error code 1)"""
72
+
73
+
70
74
  class HTUndefinedError(HTError):
71
75
  """Raise when error occurs with Hattrick request"""
72
76
 
@@ -78,5 +78,5 @@ class HTLightYouthTeam(BaseHTYouthTeam):
78
78
 
79
79
  _r_id = HTInitVar(param='youthTeamID', init_arg='id_', fill_with='id')
80
80
 
81
- def details(self):
82
- return self._chpp.youth_team(id_=self.id)
81
+ def details(self, **kwargs):
82
+ return self._chpp.youth_team(id_=self.id, **kwargs)
@@ -315,7 +315,7 @@ class HTMLSubstitutionItem(CustomModel, ml.TeamSubstitutionItem):
315
315
  """
316
316
 
317
317
 
318
- class HTMLEndingLineupPlayersItem(HTMLLineupPlayersItem, ml.TeamStartingLineupPlayerItem):
318
+ class HTMLEndingLineupPlayersItem(HTMLLineupPlayersItem, ml.TeamLineupPlayerItem):
319
319
  """
320
320
  Hattrick Match Lineup -> Team lineup -> Ending lineup -> -> Player item
321
321
  """
@@ -207,7 +207,7 @@ class HTModel(metaclass=MetaHTModel):
207
207
  previous_xml_prefix = ''
208
208
  for level in field.attr_name.split('.'):
209
209
  type_ = target_cls.get_type(level)
210
- target_field = getattr(target_cls, level)
210
+ target_field = copy(getattr(target_cls, level))
211
211
  if proxy_path and proxy_path[-1] != '/':
212
212
  proxy_path += '/'
213
213
  proxy_path += previous_xml_prefix + target_field.path
@@ -0,0 +1,55 @@
1
+ from datetime import datetime
2
+ from typing import List, Optional
3
+
4
+ from pychpp.models.ht_model import HTField, HTInitVar, HTModel
5
+
6
+
7
+ class RequestAchievements(HTModel):
8
+ """
9
+ Achievements - Request arguments
10
+ """
11
+ SOURCE_FILE = "achievements"
12
+ LAST_VERSION = "1.4"
13
+
14
+ _r_user_id: Optional[int] = HTInitVar('userID', init_arg='user_id')
15
+
16
+
17
+ class Achievements(RequestAchievements):
18
+ """
19
+ Achievements
20
+ """
21
+ max_points: int = HTField('MaxPoints')
22
+ achievements: List['Achievement'] = HTField('AchievementList', items='Achievement')
23
+
24
+
25
+ class Achievement(HTModel):
26
+ """
27
+ Achievements -> Achievements -> Achievement item
28
+ """
29
+ type_id: int = HTField('AchievementTypeID')
30
+ title: str = HTField('AchievementTitle', version='>=1.2')
31
+ text: str = HTField('AchievementText')
32
+ category_id: int = HTField('CategoryID')
33
+ category_group_id: int = HTField('CategoryGroupID', version='>=1.4')
34
+ event_date: datetime = HTField('EventDate')
35
+ points: int = HTField('Points')
36
+ multilevel: bool = HTField('MultiLevel')
37
+ rank: int = HTField('Rank', version='>=1.1')
38
+ number_of_events: int = HTField('NumberOfEvents')
39
+ completed: bool = HTField('Completed', version='>=1.3')
40
+ max_points: int = HTField('MaxPoints', version='>=1.3')
41
+ progress_value: Optional[int] = HTField('ProgressValue', version='>=1.3')
42
+ progress_value_date: Optional[datetime] = HTField('ProgressValueDate', version='>=1.3')
43
+ current_variation: Optional['AchievementVariation'] = HTField('CurrentVariation',
44
+ version='>=1.3')
45
+ next_variation: Optional['AchievementVariation'] = HTField('NextVariation',
46
+ version='>=1.3')
47
+
48
+
49
+ class AchievementVariation(HTModel):
50
+ """
51
+ Achievements -> Achievement -> Current/Next variation
52
+ """
53
+ rank: int = HTField('Rank')
54
+ value_to_achieve: int = HTField('ValueToAchieve')
55
+ points: int = HTField('Points')
@@ -8,13 +8,14 @@ class RequestAlliances(HTModel):
8
8
  Alliances - Request arguments
9
9
  """
10
10
  SOURCE_FILE = "alliances"
11
- LAST_VERSION = "1.4"
11
+ LAST_VERSION = "1.5"
12
12
 
13
13
  _r_search_type: Optional[int] = HTInitVar('searchType', init_arg='search_type')
14
14
  _r_search_language_id: Optional[int] = HTInitVar('searchLanguageID',
15
15
  init_arg='search_language_id')
16
16
  _r_search_for: str = HTInitVar('searchFor', init_arg='search_for')
17
17
  _r_page_index: Optional[int] = HTInitVar('pageIndex', init_arg='page_index')
18
+ _r_user_id: Optional[int] = HTInitVar('userId', init_arg='user_id')
18
19
 
19
20
 
20
21
  class Alliances(RequestAlliances):
@@ -23,7 +24,7 @@ class Alliances(RequestAlliances):
23
24
  """
24
25
  pages: int = HTField('Pages')
25
26
  page_index: int = HTField('PageIndex')
26
- user_supporter_tier: str = HTField('UserSupporterTier')
27
+ user_supporter_tier: str = HTField('UserSupporterTier', version='>=1.4')
27
28
  alliances: List['AllianceItem'] = HTField('Alliances', items='Alliance', xml_prefix='Alliance')
28
29
 
29
30
 
@@ -11,7 +11,7 @@ class RequestHallOfFamePlayers(HTModel):
11
11
  Hall of Fame Players - Request arguments
12
12
  """
13
13
  SOURCE_FILE = 'hofplayers'
14
- LAST_VERSION = '1.2'
14
+ LAST_VERSION = '1.3'
15
15
 
16
16
  _r_team_id: Optional[int] = HTInitVar('teamID', init_arg='team_id')
17
17
 
@@ -33,8 +33,14 @@ class PlayerItem(HTModel):
33
33
  last_name: str = HTField('LastName')
34
34
  age: int = HTField('Age')
35
35
  next_birthday: datetime = HTField('NextBirthday')
36
- country_id: int = HTField('CountryID')
36
+ country_id: int = HTField('CountryID', version='>=1.1')
37
37
  arrival_date: datetime = HTField('ArrivalDate')
38
38
  expert_type: int = HTField('ExpertType')
39
39
  hof_date: datetime = HTField('HofDate')
40
40
  hof_age: int = HTField('HofAge')
41
+ matches_in_club: Optional[int] = HTField('MatchesInClub', version='>=1.3')
42
+ best_performance_value: Optional[float] = HTField('BestPerformanceValue', version='>=1.3')
43
+ no_of_times_training_match_hero: Optional[int] = HTField('NoOfTimesTrainingMatchHero',
44
+ version='>=1.3')
45
+ faithful_to_the_club: Optional[int] = HTField('FaithfulToTheClub', version='>=1.3')
46
+ no_of_clean_sheet: Optional[int] = HTField('NoOfCleanSheet', version='>=1.3')