pychpp 0.4.7__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.7 → pychpp-0.4.8}/PKG-INFO +54 -49
  2. {pychpp-0.4.7 → pychpp-0.4.8}/README.md +53 -48
  3. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/chpp.py +44 -1
  4. pychpp-0.4.8/pychpp/models/xml/tournament_details.py +46 -0
  5. pychpp-0.4.8/pychpp/models/xml/tournament_fixtures.py +46 -0
  6. pychpp-0.4.8/pychpp/models/xml/tournament_league_tables.py +54 -0
  7. pychpp-0.4.8/pychpp/models/xml/tournament_list.py +50 -0
  8. pychpp-0.4.8/pychpp/models/xml/training_events.py +46 -0
  9. {pychpp-0.4.7 → pychpp-0.4.8}/pyproject.toml +1 -1
  10. {pychpp-0.4.7 → pychpp-0.4.8}/LICENSE +0 -0
  11. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/__init__.py +0 -0
  12. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/fixtures/__init__.py +0 -0
  13. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/fixtures/ht_datetime.py +0 -0
  14. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/fixtures/ht_error.py +0 -0
  15. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/__init__.py +0 -0
  16. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/__init__.py +0 -0
  17. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/__init__.py +0 -0
  18. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_arena.py +0 -0
  19. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_country.py +0 -0
  20. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_league.py +0 -0
  21. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_league_unit.py +0 -0
  22. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_match.py +0 -0
  23. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_player.py +0 -0
  24. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_region.py +0 -0
  25. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_team.py +0 -0
  26. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/base/ht_user.py +0 -0
  27. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_arena.py +0 -0
  28. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_challenge.py +0 -0
  29. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_league.py +0 -0
  30. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_league_unit.py +0 -0
  31. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_match.py +0 -0
  32. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_match_lineup.py +0 -0
  33. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_matches_archive.py +0 -0
  34. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_player.py +0 -0
  35. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_region.py +0 -0
  36. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_team.py +0 -0
  37. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_transfer_history.py +0 -0
  38. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_user.py +0 -0
  39. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_youth_player.py +0 -0
  40. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/custom/ht_youth_team.py +0 -0
  41. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/ht_field.py +0 -0
  42. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/ht_init_var.py +0 -0
  43. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/ht_model.py +0 -0
  44. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/ht_version.py +0 -0
  45. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/ht_xml.py +0 -0
  46. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/__init__.py +0 -0
  47. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/achievements.py +0 -0
  48. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/alliance_details.py +0 -0
  49. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/alliances.py +0 -0
  50. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/arena_details.py +0 -0
  51. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/avatars.py +0 -0
  52. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/bookmarks.py +0 -0
  53. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/challenges.py +0 -0
  54. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/club.py +0 -0
  55. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/cup_matches.py +0 -0
  56. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/current_bids.py +0 -0
  57. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/economy.py +0 -0
  58. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/fans.py +0 -0
  59. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/hof_players.py +0 -0
  60. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/ladder_details.py +0 -0
  61. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/ladder_list.py +0 -0
  62. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/league_details.py +0 -0
  63. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/league_fixtures.py +0 -0
  64. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/league_levels.py +0 -0
  65. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/live.py +0 -0
  66. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/manager_compendium.py +0 -0
  67. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/match_details.py +0 -0
  68. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/match_lineup.py +0 -0
  69. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/match_orders.py +0 -0
  70. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/matches.py +0 -0
  71. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/matches_archive.py +0 -0
  72. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/national_players.py +0 -0
  73. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/national_team_details.py +0 -0
  74. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/national_team_matches.py +0 -0
  75. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/national_teams.py +0 -0
  76. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/player_details.py +0 -0
  77. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/player_events.py +0 -0
  78. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/players.py +0 -0
  79. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/region_details.py +0 -0
  80. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/search.py +0 -0
  81. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/staff_avatars.py +0 -0
  82. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/staff_list.py +0 -0
  83. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/supporters.py +0 -0
  84. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/team_details.py +0 -0
  85. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/training.py +0 -0
  86. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/transfers_team.py +0 -0
  87. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/world_cup.py +0 -0
  88. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/world_details.py +0 -0
  89. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/youth_player_details.py +0 -0
  90. {pychpp-0.4.7 → pychpp-0.4.8}/pychpp/models/xml/youth_player_list.py +0 -0
  91. {pychpp-0.4.7 → 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.7
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,57 +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
- ![45/57](https://progress-bar.xyz/79/?title=45%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
- | 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
- | Training | `training.xml` |
213
- | TransfersTeam | `transfersteam.xml` |
214
- | WorldCup | `worldcup.xml` |
215
- | WorldDetails | `worlddetails.xml` |
216
- | YouthPlayerDetails | `youthplayerdetails.xml` |
217
- | YouthPlayerList | `youthplayerlist.xml` |
218
- | 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` |
219
224
 
220
225
  ## License
221
226
  pyCHPP is licensed under the Apache License 2.0.
@@ -143,57 +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
- ![45/57](https://progress-bar.xyz/79/?title=45%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
- | 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
- | Training | `training.xml` |
191
- | TransfersTeam | `transfersteam.xml` |
192
- | WorldCup | `worldcup.xml` |
193
- | WorldDetails | `worlddetails.xml` |
194
- | YouthPlayerDetails | `youthplayerdetails.xml` |
195
- | YouthPlayerList | `youthplayerlist.xml` |
196
- | 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` |
197
202
 
198
203
  ## License
199
204
  pyCHPP is licensed under the Apache License 2.0.
@@ -15,7 +15,9 @@ from pychpp.models.xml import (manager_compendium, team_details, achievements, a
15
15
  alliance_details, avatars, bookmarks, club, current_bids, economy,
16
16
  fans, hof_players, ladder_details, ladder_list, league_levels, live,
17
17
  matches, match_orders, national_team_matches, national_players,
18
- player_events, search, staff_avatars, staff_list, supporters)
18
+ player_events, search, staff_avatars, staff_list, supporters,
19
+ tournament_details, tournament_fixtures, tournament_league_tables,
20
+ tournament_list, training_events)
19
21
  from pychpp.models.custom import (ht_team, ht_arena, ht_user, ht_region, ht_youth_team, ht_player,
20
22
  ht_league_unit, ht_youth_player, ht_league, ht_matches_archive,
21
23
  ht_match, ht_challenge, ht_match_lineup, ht_transfer_history)
@@ -907,6 +909,39 @@ class CHPPXml(CHPPBase):
907
909
  ** kwargs,
908
910
  )
909
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
+
910
945
  def xml_training(
911
946
  self, action_type: str = 'view', team_id: int = None,
912
947
  training_type: int = None, training_level: int = None,
@@ -939,6 +974,14 @@ class CHPPXml(CHPPBase):
939
974
  raise ValueError("if set, 'action_type' must be equal to"
940
975
  "'view', 'setTraining' or 'stats'")
941
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
+
942
985
  def xml_transfers_team(
943
986
  self, team_id: int = None, page_index: int = None, **kwargs,
944
987
  ) -> transfers_team.TransfersTeam:
@@ -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.7"
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
File without changes
File without changes