pychpp 0.4.8__tar.gz → 0.5.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 (98) hide show
  1. {pychpp-0.4.8 → pychpp-0.5.0}/PKG-INFO +9 -2
  2. {pychpp-0.4.8 → pychpp-0.5.0}/README.md +8 -1
  3. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/chpp.py +75 -1
  4. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/ht_xml.py +1 -1
  5. pychpp-0.5.0/pychpp/models/xml/transfer_search.py +111 -0
  6. pychpp-0.5.0/pychpp/models/xml/transfers_player.py +56 -0
  7. pychpp-0.5.0/pychpp/models/xml/translations.py +122 -0
  8. pychpp-0.5.0/pychpp/models/xml/world_languages.py +27 -0
  9. pychpp-0.5.0/pychpp/models/xml/youth_avatars.py +50 -0
  10. pychpp-0.5.0/pychpp/models/xml/youth_league_details.py +45 -0
  11. pychpp-0.5.0/pychpp/models/xml/youth_league_fixtures.py +52 -0
  12. {pychpp-0.4.8 → pychpp-0.5.0}/pyproject.toml +1 -1
  13. {pychpp-0.4.8 → pychpp-0.5.0}/LICENSE +0 -0
  14. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/__init__.py +0 -0
  15. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/fixtures/__init__.py +0 -0
  16. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/fixtures/ht_datetime.py +0 -0
  17. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/fixtures/ht_error.py +0 -0
  18. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/__init__.py +0 -0
  19. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/__init__.py +0 -0
  20. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/__init__.py +0 -0
  21. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_arena.py +0 -0
  22. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_country.py +0 -0
  23. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_league.py +0 -0
  24. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_league_unit.py +0 -0
  25. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_match.py +0 -0
  26. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_player.py +0 -0
  27. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_region.py +0 -0
  28. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_team.py +0 -0
  29. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/base/ht_user.py +0 -0
  30. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_arena.py +0 -0
  31. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_challenge.py +0 -0
  32. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_league.py +0 -0
  33. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_league_unit.py +0 -0
  34. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_match.py +0 -0
  35. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_match_lineup.py +0 -0
  36. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_matches_archive.py +0 -0
  37. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_player.py +0 -0
  38. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_region.py +0 -0
  39. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_team.py +0 -0
  40. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_transfer_history.py +0 -0
  41. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_user.py +0 -0
  42. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_youth_player.py +0 -0
  43. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/custom/ht_youth_team.py +0 -0
  44. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/ht_field.py +0 -0
  45. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/ht_init_var.py +0 -0
  46. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/ht_model.py +0 -0
  47. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/ht_version.py +0 -0
  48. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/__init__.py +0 -0
  49. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/achievements.py +0 -0
  50. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/alliance_details.py +0 -0
  51. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/alliances.py +0 -0
  52. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/arena_details.py +0 -0
  53. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/avatars.py +0 -0
  54. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/bookmarks.py +0 -0
  55. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/challenges.py +0 -0
  56. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/club.py +0 -0
  57. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/cup_matches.py +0 -0
  58. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/current_bids.py +0 -0
  59. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/economy.py +0 -0
  60. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/fans.py +0 -0
  61. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/hof_players.py +0 -0
  62. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/ladder_details.py +0 -0
  63. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/ladder_list.py +0 -0
  64. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/league_details.py +0 -0
  65. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/league_fixtures.py +0 -0
  66. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/league_levels.py +0 -0
  67. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/live.py +0 -0
  68. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/manager_compendium.py +0 -0
  69. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/match_details.py +0 -0
  70. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/match_lineup.py +0 -0
  71. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/match_orders.py +0 -0
  72. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/matches.py +0 -0
  73. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/matches_archive.py +0 -0
  74. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/national_players.py +0 -0
  75. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/national_team_details.py +0 -0
  76. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/national_team_matches.py +0 -0
  77. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/national_teams.py +0 -0
  78. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/player_details.py +0 -0
  79. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/player_events.py +0 -0
  80. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/players.py +0 -0
  81. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/region_details.py +0 -0
  82. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/search.py +0 -0
  83. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/staff_avatars.py +0 -0
  84. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/staff_list.py +0 -0
  85. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/supporters.py +0 -0
  86. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/team_details.py +0 -0
  87. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/tournament_details.py +0 -0
  88. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/tournament_fixtures.py +0 -0
  89. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/tournament_league_tables.py +0 -0
  90. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/tournament_list.py +0 -0
  91. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/training.py +0 -0
  92. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/training_events.py +0 -0
  93. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/transfers_team.py +0 -0
  94. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/world_cup.py +0 -0
  95. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/world_details.py +0 -0
  96. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/youth_player_details.py +0 -0
  97. {pychpp-0.4.8 → pychpp-0.5.0}/pychpp/models/xml/youth_player_list.py +0 -0
  98. {pychpp-0.4.8 → pychpp-0.5.0}/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.8
3
+ Version: 0.5.0
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,7 +165,7 @@ 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
- ![50/57](https://progress-bar.xyz/88/?title=50%20on%2057)
168
+ ![57/57](https://progress-bar.xyz/100/?title=57%20on%2057)
169
169
 
170
170
  The following table shows the CHPP XML files that are currently supported:
171
171
 
@@ -215,9 +215,16 @@ The following table shows the CHPP XML files that are currently supported:
215
215
  | TournamentList | `tournamentlist.xml` |
216
216
  | Training | `training.xml` |
217
217
  | TrainingEvents | `trainingevents.xml` |
218
+ | TransferSearch | `transfersearch.xml` |
219
+ | TransfersPlayer | `transfersplayer.xml` |
218
220
  | TransfersTeam | `transfersteam.xml` |
221
+ | Translations | `translations.xml` |
219
222
  | WorldCup | `worldcup.xml` |
220
223
  | WorldDetails | `worlddetails.xml` |
224
+ | WorldLanguages | `worldlanguages.xml` |
225
+ | YouthAvatars | `youthavatars.xml` |
226
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
227
+ | YouthLeagueFixtures | `youthleaguefixtures.xml` |
221
228
  | YouthPlayerDetails | `youthplayerdetails.xml` |
222
229
  | YouthPlayerList | `youthplayerlist.xml` |
223
230
  | YouthTeamDetails | `youthteamdetails.xml` |
@@ -143,7 +143,7 @@ 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
- ![50/57](https://progress-bar.xyz/88/?title=50%20on%2057)
146
+ ![57/57](https://progress-bar.xyz/100/?title=57%20on%2057)
147
147
 
148
148
  The following table shows the CHPP XML files that are currently supported:
149
149
 
@@ -193,9 +193,16 @@ The following table shows the CHPP XML files that are currently supported:
193
193
  | TournamentList | `tournamentlist.xml` |
194
194
  | Training | `training.xml` |
195
195
  | TrainingEvents | `trainingevents.xml` |
196
+ | TransferSearch | `transfersearch.xml` |
197
+ | TransfersPlayer | `transfersplayer.xml` |
196
198
  | TransfersTeam | `transfersteam.xml` |
199
+ | Translations | `translations.xml` |
197
200
  | WorldCup | `worldcup.xml` |
198
201
  | WorldDetails | `worlddetails.xml` |
202
+ | WorldLanguages | `worldlanguages.xml` |
203
+ | YouthAvatars | `youthavatars.xml` |
204
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
205
+ | YouthLeagueFixtures | `youthleaguefixtures.xml` |
199
206
  | YouthPlayerDetails | `youthplayerdetails.xml` |
200
207
  | YouthPlayerList | `youthplayerlist.xml` |
201
208
  | YouthTeamDetails | `youthteamdetails.xml` |
@@ -17,7 +17,9 @@ from pychpp.models.xml import (manager_compendium, team_details, achievements, a
17
17
  matches, match_orders, national_team_matches, national_players,
18
18
  player_events, search, staff_avatars, staff_list, supporters,
19
19
  tournament_details, tournament_fixtures, tournament_league_tables,
20
- tournament_list, training_events)
20
+ tournament_list, training_events, transfer_search, transfers_player,
21
+ world_languages, youth_avatars, youth_league_details,
22
+ youth_league_fixtures, translations)
21
23
  from pychpp.models.custom import (ht_team, ht_arena, ht_user, ht_region, ht_youth_team, ht_player,
22
24
  ht_league_unit, ht_youth_player, ht_league, ht_matches_archive,
23
25
  ht_match, ht_challenge, ht_match_lineup, ht_transfer_history)
@@ -982,6 +984,42 @@ class CHPPXml(CHPPBase):
982
984
  chpp=self, player_id=player_id, **kwargs,
983
985
  )
984
986
 
987
+ def xml_transfer_search(
988
+ self, age_min: int, age_max: int, skill_type_1: int, min_skill_value_1: int,
989
+ max_skill_value_1: int, age_days_min: int = None, age_days_max: int = None,
990
+ skill_type_2: int = None, min_skill_value_2: int = None, max_skill_value_2: int = None,
991
+ skill_type_3: int = None, min_skill_value_3: int = None, max_skill_value_3: int = None,
992
+ skill_type_4: int = None, min_skill_value_4: int = None, max_skill_value_4: int = None,
993
+ specialty: int = None, native_country_id: int = None,
994
+ tsi_min: int = None, tsi_max: int = None, price_min: int = None, price_max: int = None,
995
+ page_size: int = None, page_index: int = None, **kwargs,
996
+ ) -> transfer_search.TransferSearch:
997
+
998
+ return transfer_search.TransferSearch(
999
+ chpp=self,
1000
+ age_min=age_min, age_days_min=age_days_min,
1001
+ age_max=age_max, age_days_max=age_days_max,
1002
+ skill_type_1=skill_type_1,
1003
+ min_skill_value_1=min_skill_value_1, max_skill_value_1=max_skill_value_1,
1004
+ skill_type_2=skill_type_2,
1005
+ min_skill_value_2=min_skill_value_2, max_skill_value_2=max_skill_value_2,
1006
+ skill_type_3=skill_type_3,
1007
+ min_skill_value_3=min_skill_value_3, max_skill_value_3=max_skill_value_3,
1008
+ skill_type_4=skill_type_4,
1009
+ min_skill_value_4=min_skill_value_4, max_skill_value_4=max_skill_value_4,
1010
+ specialty=specialty, native_country_id=native_country_id,
1011
+ tsi_min=tsi_min, tsi_max=tsi_max, price_min=price_min, price_max=price_max,
1012
+ page_size=page_size, page_index=page_index, **kwargs,
1013
+ )
1014
+
1015
+ def xml_transfers_player(
1016
+ self, player_id: int, **kwargs,
1017
+ ) -> transfers_player.TransfersPlayer:
1018
+
1019
+ return transfers_player.TransfersPlayer(
1020
+ chpp=self, player_id=player_id, **kwargs,
1021
+ )
1022
+
985
1023
  def xml_transfers_team(
986
1024
  self, team_id: int = None, page_index: int = None, **kwargs,
987
1025
  ) -> transfers_team.TransfersTeam:
@@ -990,6 +1028,14 @@ class CHPPXml(CHPPBase):
990
1028
  chpp=self, team_id=team_id, page_index=page_index, **kwargs,
991
1029
  )
992
1030
 
1031
+ def xml_translations(
1032
+ self, language_id: int = None, **kwargs,
1033
+ ) -> translations.Translations:
1034
+
1035
+ return translations.Translations(
1036
+ chpp=self, language_id=language_id, **kwargs,
1037
+ )
1038
+
993
1039
  def xml_world_cup(
994
1040
  self, action_type: str = 'viewMatches', cup_id: int = None,
995
1041
  season: int = None, match_round: int = None,
@@ -1023,6 +1069,34 @@ class CHPPXml(CHPPBase):
1023
1069
  league_id=league_id, **kwargs,
1024
1070
  )
1025
1071
 
1072
+ def xml_world_languages(self, **kwargs) -> world_languages.WorldLanguages:
1073
+
1074
+ return world_languages.WorldLanguages(chpp=self, **kwargs)
1075
+
1076
+ def xml_youth_avatars(
1077
+ self, youth_team_id: int = None, **kwargs,
1078
+ ) -> youth_avatars.YouthAvatars:
1079
+
1080
+ return youth_avatars.YouthAvatars(
1081
+ chpp=self, youth_team_id=youth_team_id, **kwargs,
1082
+ )
1083
+
1084
+ def xml_youth_league_details(
1085
+ self, youth_league_id: int = None, **kwargs,
1086
+ ) -> youth_league_details.YouthLeagueDetails:
1087
+
1088
+ return youth_league_details.YouthLeagueDetails(
1089
+ chpp=self, youth_league_id=youth_league_id, **kwargs,
1090
+ )
1091
+
1092
+ def xml_youth_league_fixtures(
1093
+ self, youth_league_id: int = None, season: int = None, **kwargs,
1094
+ ) -> youth_league_fixtures.YouthLeagueFixtures:
1095
+
1096
+ return youth_league_fixtures.YouthLeagueFixtures(
1097
+ chpp=self, youth_league_id=youth_league_id, season=season, **kwargs,
1098
+ )
1099
+
1026
1100
  def xml_youth_player_details(
1027
1101
  self, action_type: str = None, youth_player_id: int = None,
1028
1102
  show_scout_call: bool = None, show_last_match: bool = None,
@@ -30,7 +30,7 @@ class HTXml:
30
30
  @staticmethod
31
31
  def ht_float(data: ElementTree.Element, attrib: str = None):
32
32
  if attrib is not None:
33
- return float(data.attrib.get(attrib, None))
33
+ return float(data.attrib.get(attrib, None).replace(',', '.'))
34
34
  else:
35
35
  return float(data.text.replace(',', '.')) if data.text is not None else None
36
36
 
@@ -0,0 +1,111 @@
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 RequestTransferSearch(HTModel):
10
+ """
11
+ Transfer Search - Request arguments
12
+ """
13
+ SOURCE_FILE = 'transfersearch'
14
+ LAST_VERSION = '1.1'
15
+
16
+ _r_age_min: int = HTInitVar('ageMin', init_arg='age_min')
17
+ _r_age_days_min: Optional[int] = HTInitVar('ageDaysMin', init_arg='age_days_min')
18
+ _r_age_max: int = HTInitVar('ageMax', init_arg='age_max')
19
+ _r_age_days_max: Optional[int] = HTInitVar('ageDaysMax', init_arg='age_days_max')
20
+ _r_skill_type_1: int = HTInitVar('skillType1', init_arg='skill_type_1')
21
+ _r_min_skill_value_1: int = HTInitVar('minSkillValue1', init_arg='min_skill_value_1')
22
+ _r_max_skill_value_1: int = HTInitVar('maxSkillValue1', init_arg='max_skill_value_1')
23
+ _r_skill_type_2: Optional[int] = HTInitVar('skillType2', init_arg='skill_type_2')
24
+ _r_min_skill_value_2: Optional[int] = HTInitVar('minSkillValue2', init_arg='min_skill_value_2')
25
+ _r_max_skill_value_2: Optional[int] = HTInitVar('maxSkillValue2', init_arg='max_skill_value_2')
26
+ _r_skill_type_3: Optional[int] = HTInitVar('skillType3', init_arg='skill_type_3')
27
+ _r_min_skill_value_3: Optional[int] = HTInitVar('minSkillValue3', init_arg='min_skill_value_3')
28
+ _r_max_skill_value_3: Optional[int] = HTInitVar('maxSkillValue3', init_arg='max_skill_value_3')
29
+ _r_skill_type_4: Optional[int] = HTInitVar('skillType4', init_arg='skill_type_4')
30
+ _r_min_skill_value_4: Optional[int] = HTInitVar('minSkillValue4', init_arg='min_skill_value_4')
31
+ _r_max_skill_value_4: Optional[int] = HTInitVar('maxSkillValue4', init_arg='max_skill_value_4')
32
+ _r_specialty: Optional[int] = HTInitVar('Specialty', init_arg='specialty')
33
+ _r_native_country_id: Optional[int] = HTInitVar('nativeCountryId',
34
+ init_arg='native_country_id')
35
+ _r_tsi_min: Optional[int] = HTInitVar('tsiMin', init_arg='tsi_min')
36
+ _r_tsi_max: Optional[int] = HTInitVar('tsiMax', init_arg='tsi_max')
37
+ _r_price_min: Optional[int] = HTInitVar('priceMin', init_arg='price_min')
38
+ _r_price_max: Optional[int] = HTInitVar('priceMax', init_arg='price_max')
39
+ _r_page_size: Optional[int] = HTInitVar('pageSize', init_arg='page_size')
40
+ _r_page_index: Optional[int] = HTInitVar('pageIndex', init_arg='page_index')
41
+
42
+
43
+ class TransferSearch(RequestTransferSearch):
44
+ """
45
+ Transfer Search
46
+ """
47
+ XML_PREFIX = 'TransferSearch/'
48
+
49
+ item_count: int = HTField('ItemCount')
50
+ page_size: int = HTField('PageSize')
51
+ page_index: int = HTField('PageIndex')
52
+ transfer_results: List['TransferResultItem'] = HTField('TransferResults',
53
+ items='TransferResult')
54
+
55
+
56
+ class TransferResultItem(HTModel):
57
+ """
58
+ Transfer Search -> Transfer Results -> Transfer Result item
59
+ """
60
+ id: int = HTField('PlayerId')
61
+ first_name: str = HTField('FirstName')
62
+ nick_name: str = HTField('NickName')
63
+ last_name: str = HTField('LastName')
64
+ native_country_id: int = HTField('NativeCountryID')
65
+ asking_price: int = HTField('AskingPrice')
66
+ deadline: datetime = HTField('Deadline')
67
+ highest_bid: int = HTField('HighestBid')
68
+ bidder_team: 'BidderTeam' = HTField('BidderTeam')
69
+ details: 'Details' = HTField('Details')
70
+
71
+
72
+ class BidderTeam(HTModel):
73
+ """
74
+ Transfer Search -> Transfer Results -> Transfer Result item -> Bidder Team
75
+ """
76
+ id: Optional[int] = HTField('TeamID')
77
+ name: Optional[str] = HTField('TeamName')
78
+
79
+
80
+ class Details(HTModel):
81
+ """
82
+ Transfer Search -> Transfer Results -> Transfer Result item -> Details
83
+ """
84
+ age: int = HTField('Age')
85
+ age_days: int = HTField('AgeDays')
86
+ salary: int = HTField('Salary')
87
+ tsi: int = HTField('TSI')
88
+ player_form: int = HTField('PlayerForm')
89
+ experience: int = HTField('Experience')
90
+ leadership: int = HTField('Leadership')
91
+ specialty: int = HTField('Specialty')
92
+ cards: Optional[int] = HTField('Cards')
93
+ injury_level: Optional[int] = HTField('InjuryLevel')
94
+ stamina_skill: int = HTField('StaminaSkill')
95
+ keeper_skill: int = HTField('KeeperSkill')
96
+ playmaker_skill: int = HTField('PlaymakerSkill')
97
+ scorer_skill: int = HTField('ScorerSkill')
98
+ passing_skill: int = HTField('PassingSkill')
99
+ winger_skill: int = HTField('WingerSkill')
100
+ defender_skill: int = HTField('DefenderSkill')
101
+ set_pieces_skill: int = HTField('SetPiecesSkill')
102
+ seller_team: 'SellerTeam' = HTField('SellerTeam')
103
+
104
+
105
+ class SellerTeam(HTModel):
106
+ """
107
+ Transfer Search -> Transfer Results -> Transfer Result item -> Details -> Seller Team
108
+ """
109
+ id: int = HTField('TeamID')
110
+ name: str = HTField('TeamName')
111
+ league_id: int = HTField('LeagueId')
@@ -0,0 +1,56 @@
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 RequestTransfersPlayer(HTModel):
10
+ """
11
+ Transfers Player - Request arguments
12
+ """
13
+ SOURCE_FILE = 'transfersplayer'
14
+ LAST_VERSION = '1.1'
15
+
16
+ _r_player_id: int = HTInitVar('playerID', init_arg='player_id')
17
+
18
+
19
+ class TransfersPlayer(RequestTransfersPlayer):
20
+ """
21
+ Transfers Player
22
+ """
23
+ XML_PREFIX = 'Transfers/'
24
+
25
+ start_date: datetime = HTField('StartDate')
26
+ end_date: datetime = HTField('EndDate')
27
+ player: 'Player' = HTField('Player')
28
+ transfers: List['TransferItem'] = HTField('.', items='Transfer')
29
+
30
+
31
+ class Player(HTModel):
32
+ """
33
+ Transfers Player -> Player
34
+ """
35
+ id: int = HTField('PlayerID')
36
+ name: str = HTField('PlayerName')
37
+
38
+
39
+ class TransferItem(HTModel):
40
+ """
41
+ Transfers Player -> Transfers -> Transfer item
42
+ """
43
+ id: int = HTField('TransferID')
44
+ deadline: datetime = HTField('Deadline')
45
+ buyer: 'Team' = HTField('Buyer', xml_prefix='Buyer')
46
+ seller: 'Team' = HTField('Seller', xml_prefix='Seller')
47
+ price: int = HTField('Price')
48
+ tsi: int = HTField('TSI')
49
+
50
+
51
+ class Team(HTModel):
52
+ """
53
+ Transfers Player -> Transfers -> Transfer item -> Buyer/Seller
54
+ """
55
+ id: int = HTField('TeamID')
56
+ name: str = HTField('TeamName')
@@ -0,0 +1,122 @@
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 RequestTranslations(HTModel):
9
+ """
10
+ Translations - Request arguments
11
+ """
12
+ SOURCE_FILE = 'translations'
13
+ LAST_VERSION = '1.2'
14
+
15
+ _r_language_id: Optional[int] = HTInitVar('languageId', init_arg='language_id')
16
+
17
+
18
+ class Translations(RequestTranslations):
19
+ """
20
+ Translations
21
+ """
22
+ id: int = HTField('Language', attrib='Id')
23
+ name: str = HTField('Language')
24
+ texts: 'Texts' = HTField('Texts')
25
+
26
+
27
+ class Texts(HTModel):
28
+ """
29
+ Translations -> Texts
30
+ """
31
+ skill_names: List['SkillNameItem'] = HTField('SkillNames', items='Skill')
32
+ skill_levels: List['SkillLevelItem'] = HTField('SkillLevels', items='Level')
33
+ skill_sub_levels: List['SkillSubLevelItem'] = HTField('SkillSubLevels', items='SubLevel')
34
+ player_specialties: 'TranslationListItemValue' = HTField('PlayerSpecialties')
35
+ player_agreeability: 'TranslationListLevelValue' = HTField('PlayerAgreeability')
36
+ player_agressiveness: 'TranslationListLevelValue' = HTField('PlayerAgressiveness')
37
+ player_honesty: 'TranslationListLevelValue' = HTField('PlayerHonesty')
38
+ tactic_types: 'TranslationListItemValue' = HTField('TacticTypes')
39
+ match_positions: 'TranslationListItemType' = HTField('MatchPositions')
40
+ rating_sectors: 'TranslationListItemType' = HTField('RatingSectors')
41
+ team_attitude: 'TranslationListLevelValue' = HTField('TeamAttitude')
42
+ team_spirit: 'TranslationListLevelValue' = HTField('TeamSpirit')
43
+ confidence: 'TranslationListLevelValue' = HTField('Confidence')
44
+ training_types: 'TranslationListItemValue' = HTField('TrainingTypes')
45
+ sponsors: 'TranslationListLevelValue' = HTField('Sponsors')
46
+ fan_mood: 'TranslationListLevelValue' = HTField('FanMood')
47
+ fan_match_expectations: 'TranslationListLevelValue' = HTField('FanMatchExpectations')
48
+ fan_season_expectations: 'TranslationListLevelValue' = HTField('FanSeasonExpectations')
49
+ league_names: List['LeagueItem'] = HTField('LeagueNames', items='League')
50
+
51
+
52
+ class SkillNameItem(HTModel):
53
+ """
54
+ Translations -> Skill Names -> Skill item
55
+ """
56
+ type: str = HTField('.', attrib='Type')
57
+ type_name: str = HTField('.')
58
+
59
+
60
+ class SkillLevelItem(HTModel):
61
+ """
62
+ Translations -> Skill Levels -> Skill item
63
+ """
64
+ value: int = HTField('.', attrib='Value')
65
+ value_name: str = HTField('.')
66
+
67
+
68
+ class SkillSubLevelItem(HTModel):
69
+ """
70
+ Translations -> Skill Levels -> Skill item
71
+ """
72
+ value: float = HTField('.', attrib='Value')
73
+ value_name: str = HTField('.')
74
+
75
+
76
+ class TranslationListItemValue(HTModel):
77
+ """
78
+ Translations -> Translation list - Item-Value
79
+ """
80
+ label: str = HTField('.', attrib='Label')
81
+ list: List['LevelOrItemValue'] = HTField('.', items='Item')
82
+
83
+
84
+ class TranslationListItemType(HTModel):
85
+ """
86
+ Translations -> Translation list - Item-Type
87
+ """
88
+ label: str = HTField('.', attrib='Label')
89
+ list: List['LevelOrItemType'] = HTField('.', items='Item')
90
+
91
+
92
+ class TranslationListLevelValue(HTModel):
93
+ """
94
+ Translations -> Translation list - Level-Value
95
+ """
96
+ label: str = HTField('.', attrib='Label')
97
+ list: List['LevelOrItemValue'] = HTField('.', items='Level')
98
+
99
+
100
+ class LevelOrItemValue(HTModel):
101
+ """
102
+ Translations -> Translation list -> Translation list item - Level or Item with Value
103
+ """
104
+ value: int = HTField('.', attrib='Value')
105
+ label: str = HTField('.')
106
+
107
+
108
+ class LevelOrItemType(HTModel):
109
+ """
110
+ Translations -> Translation list -> Translation list item - Level or Item with Type
111
+ """
112
+ type: str = HTField('.', attrib='Type')
113
+ label: str = HTField('.')
114
+
115
+
116
+ class LeagueItem(HTModel):
117
+ """
118
+ Translations -> League Names -> League item
119
+ """
120
+ id: int = HTField('LeagueId')
121
+ local_name: str = HTField('LocalLeagueName')
122
+ language_name: str = HTField('LanguageLeagueName')
@@ -0,0 +1,27 @@
1
+ from typing import List
2
+
3
+ from pychpp.models.ht_field import HTField
4
+ from pychpp.models.ht_model import HTModel
5
+
6
+
7
+ class RequestWorldLanguages(HTModel):
8
+ """
9
+ World Languages - Request arguments
10
+ """
11
+ SOURCE_FILE = 'worldlanguages'
12
+ LAST_VERSION = '1.2'
13
+
14
+
15
+ class WorldLanguages(RequestWorldLanguages):
16
+ """
17
+ World Languages
18
+ """
19
+ language_list: List['LanguageItem'] = HTField('LanguageList', items='Language')
20
+
21
+
22
+ class LanguageItem(HTModel):
23
+ """
24
+ World Languages -> Language List -> Language item
25
+ """
26
+ id: int = HTField('LanguageID')
27
+ name: str = HTField('LanguageName')
@@ -0,0 +1,50 @@
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 RequestYouthAvatars(HTModel):
9
+ """
10
+ Youth Avatars - Request arguments
11
+ """
12
+ SOURCE_FILE = 'youthavatars'
13
+ LAST_VERSION = '1.2'
14
+
15
+ _r_youth_team_id: Optional[int] = HTInitVar('youthTeamId', init_arg='youth_team_id')
16
+
17
+
18
+ class YouthAvatars(RequestYouthAvatars):
19
+ """
20
+ Youth Avatars
21
+ """
22
+ XML_PREFIX = 'YouthTeam/'
23
+
24
+ youth_team_id: int = HTField('YouthTeamId')
25
+ youth_players: List['YouthPlayerItem'] = HTField('YouthPlayers', items='YouthPlayer')
26
+
27
+
28
+ class YouthPlayerItem(HTModel):
29
+ """
30
+ Youth Avatars -> Youth Players -> Youth player item
31
+ """
32
+ id: int = HTField('YouthPlayerID')
33
+ avatar: 'Avatar' = HTField('Avatar')
34
+
35
+
36
+ class Avatar(HTModel):
37
+ """
38
+ Youth Avatars -> Youth Players -> Youth player item -> Avatar
39
+ """
40
+ background_image: str = HTField('BackgroundImage')
41
+ layers: List['LayerItem'] = HTField('.', items='Layer')
42
+
43
+
44
+ class LayerItem(HTModel):
45
+ """
46
+ Youth Avatars -> Youth Players -> Youth player item -> Avatar -> Layer
47
+ """
48
+ x: int = HTField('.', attrib='x')
49
+ y: int = HTField('.', attrib='y')
50
+ image: str = HTField('Image')
@@ -0,0 +1,45 @@
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 RequestYouthLeagueDetails(HTModel):
9
+ """
10
+ Youth League Details - Request arguments
11
+ """
12
+ SOURCE_FILE = 'youthleaguedetails'
13
+ LAST_VERSION = '1.0'
14
+
15
+ _r_youth_league_id: Optional[int] = HTInitVar('youthLeagueId', init_arg='youth_league_id')
16
+
17
+
18
+ class YouthLeagueDetails(RequestYouthLeagueDetails):
19
+ """
20
+ Youth League Details
21
+ """
22
+ id: int = HTField('YouthLeagueID')
23
+ name: str = HTField('YouthLeagueName')
24
+ type: int = HTField('YouthLeagueType')
25
+ season: int = HTField('Season')
26
+ last_match_round: int = HTField('LastMatchRound')
27
+ nr_of_teams_in_league: int = HTField('NrOfTeamsInLeague')
28
+ teams: List['TeamItem'] = HTField('Teams', items='Team')
29
+
30
+
31
+ class TeamItem(HTModel):
32
+ """
33
+ Youth League Details -> Teams -> Team item
34
+ """
35
+ id: int = HTField('TeamID')
36
+ name: str = HTField('TeamName')
37
+ position: int = HTField('Position')
38
+ position_change: int = HTField('PositionChange')
39
+ matches: int = HTField('Matches')
40
+ goals_for: int = HTField('GoalsFor')
41
+ goals_against: int = HTField('GoalsAgainst')
42
+ points: int = HTField('Points')
43
+ won: int = HTField('Won')
44
+ draws: int = HTField('Draws')
45
+ lost: int = HTField('Lost')
@@ -0,0 +1,52 @@
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 RequestYouthLeagueFixtures(HTModel):
10
+ """
11
+ Youth League Fixtures - Request arguments
12
+ """
13
+ SOURCE_FILE = 'youthleaguefixtures'
14
+ LAST_VERSION = '1.0'
15
+
16
+ _r_youth_league_id: Optional[int] = HTInitVar('youthleagueid', init_arg='youth_league_id')
17
+ _r_season: Optional[int] = HTInitVar('season')
18
+
19
+
20
+ class YouthLeagueFixtures(RequestYouthLeagueFixtures):
21
+ """
22
+ Youth League Fixtures
23
+ """
24
+ id: int = HTField('YouthLeagueID')
25
+ name: str = HTField('YouthLeagueName')
26
+ type: int = HTField('YouthLeagueType')
27
+ season: int = HTField('Season')
28
+ last_match_round: int = HTField('LastMatchRound')
29
+ nr_of_teams_in_league: int = HTField('NrOfTeamsInLeague')
30
+ matches: List['MatchItem'] = HTField('Matches', items='Match')
31
+
32
+
33
+ class MatchItem(HTModel):
34
+ """
35
+ Youth League Fixtures -> Matches -> Match item
36
+ """
37
+ id: int = HTField('MatchID')
38
+ round: int = HTField('MatchRound')
39
+ status: str = HTField('Status')
40
+ home_team: 'Team' = HTField('HomeTeam', xml_prefix='Home')
41
+ away_team: 'Team' = HTField('AwayTeam', xml_prefix='Away')
42
+ date: datetime = HTField('MatchDate')
43
+ home_goals: Optional[int] = HTField('HomeGoals')
44
+ away_goals: Optional[int] = HTField('AwayGoals')
45
+
46
+
47
+ class Team(HTModel):
48
+ """
49
+ Youth League Fixtures -> Matches -> Match item -> Home/Away teams
50
+ """
51
+ id: int = HTField('TeamID')
52
+ name: str = HTField('TeamName')
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pychpp"
3
- version = "0.4.8"
3
+ version = "0.5.0"
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