pychpp 0.4.8__tar.gz → 0.4.9__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 (96) hide show
  1. {pychpp-0.4.8 → pychpp-0.4.9}/PKG-INFO +7 -2
  2. {pychpp-0.4.8 → pychpp-0.4.9}/README.md +6 -1
  3. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/chpp.py +58 -1
  4. pychpp-0.4.9/pychpp/models/xml/transfer_search.py +111 -0
  5. pychpp-0.4.9/pychpp/models/xml/transfers_player.py +56 -0
  6. pychpp-0.4.9/pychpp/models/xml/world_languages.py +27 -0
  7. pychpp-0.4.9/pychpp/models/xml/youth_avatars.py +50 -0
  8. pychpp-0.4.9/pychpp/models/xml/youth_league_details.py +45 -0
  9. {pychpp-0.4.8 → pychpp-0.4.9}/pyproject.toml +1 -1
  10. {pychpp-0.4.8 → pychpp-0.4.9}/LICENSE +0 -0
  11. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/__init__.py +0 -0
  12. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/fixtures/__init__.py +0 -0
  13. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/fixtures/ht_datetime.py +0 -0
  14. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/fixtures/ht_error.py +0 -0
  15. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/__init__.py +0 -0
  16. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/__init__.py +0 -0
  17. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/__init__.py +0 -0
  18. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_arena.py +0 -0
  19. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_country.py +0 -0
  20. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_league.py +0 -0
  21. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_league_unit.py +0 -0
  22. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_match.py +0 -0
  23. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_player.py +0 -0
  24. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_region.py +0 -0
  25. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_team.py +0 -0
  26. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/base/ht_user.py +0 -0
  27. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_arena.py +0 -0
  28. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_challenge.py +0 -0
  29. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_league.py +0 -0
  30. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_league_unit.py +0 -0
  31. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_match.py +0 -0
  32. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_match_lineup.py +0 -0
  33. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_matches_archive.py +0 -0
  34. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_player.py +0 -0
  35. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_region.py +0 -0
  36. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_team.py +0 -0
  37. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_transfer_history.py +0 -0
  38. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_user.py +0 -0
  39. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_youth_player.py +0 -0
  40. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/custom/ht_youth_team.py +0 -0
  41. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/ht_field.py +0 -0
  42. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/ht_init_var.py +0 -0
  43. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/ht_model.py +0 -0
  44. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/ht_version.py +0 -0
  45. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/ht_xml.py +0 -0
  46. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/__init__.py +0 -0
  47. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/achievements.py +0 -0
  48. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/alliance_details.py +0 -0
  49. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/alliances.py +0 -0
  50. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/arena_details.py +0 -0
  51. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/avatars.py +0 -0
  52. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/bookmarks.py +0 -0
  53. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/challenges.py +0 -0
  54. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/club.py +0 -0
  55. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/cup_matches.py +0 -0
  56. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/current_bids.py +0 -0
  57. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/economy.py +0 -0
  58. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/fans.py +0 -0
  59. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/hof_players.py +0 -0
  60. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/ladder_details.py +0 -0
  61. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/ladder_list.py +0 -0
  62. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/league_details.py +0 -0
  63. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/league_fixtures.py +0 -0
  64. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/league_levels.py +0 -0
  65. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/live.py +0 -0
  66. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/manager_compendium.py +0 -0
  67. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/match_details.py +0 -0
  68. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/match_lineup.py +0 -0
  69. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/match_orders.py +0 -0
  70. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/matches.py +0 -0
  71. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/matches_archive.py +0 -0
  72. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/national_players.py +0 -0
  73. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/national_team_details.py +0 -0
  74. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/national_team_matches.py +0 -0
  75. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/national_teams.py +0 -0
  76. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/player_details.py +0 -0
  77. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/player_events.py +0 -0
  78. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/players.py +0 -0
  79. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/region_details.py +0 -0
  80. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/search.py +0 -0
  81. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/staff_avatars.py +0 -0
  82. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/staff_list.py +0 -0
  83. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/supporters.py +0 -0
  84. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/team_details.py +0 -0
  85. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/tournament_details.py +0 -0
  86. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/tournament_fixtures.py +0 -0
  87. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/tournament_league_tables.py +0 -0
  88. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/tournament_list.py +0 -0
  89. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/training.py +0 -0
  90. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/training_events.py +0 -0
  91. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/transfers_team.py +0 -0
  92. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/world_cup.py +0 -0
  93. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/world_details.py +0 -0
  94. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/youth_player_details.py +0 -0
  95. {pychpp-0.4.8 → pychpp-0.4.9}/pychpp/models/xml/youth_player_list.py +0 -0
  96. {pychpp-0.4.8 → pychpp-0.4.9}/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.4.9
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
+ ![55/57](https://progress-bar.xyz/96/?title=55%20on%2057)
169
169
 
170
170
  The following table shows the CHPP XML files that are currently supported:
171
171
 
@@ -215,9 +215,14 @@ 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` |
219
221
  | WorldCup | `worldcup.xml` |
220
222
  | WorldDetails | `worlddetails.xml` |
223
+ | WorldLanguages | `worldlanguages.xml` |
224
+ | YouthAvatars | `youthavatars.xml` |
225
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
221
226
  | YouthPlayerDetails | `youthplayerdetails.xml` |
222
227
  | YouthPlayerList | `youthplayerlist.xml` |
223
228
  | 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
+ ![55/57](https://progress-bar.xyz/96/?title=55%20on%2057)
147
147
 
148
148
  The following table shows the CHPP XML files that are currently supported:
149
149
 
@@ -193,9 +193,14 @@ 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` |
197
199
  | WorldCup | `worldcup.xml` |
198
200
  | WorldDetails | `worlddetails.xml` |
201
+ | WorldLanguages | `worldlanguages.xml` |
202
+ | YouthAvatars | `youthavatars.xml` |
203
+ | YouthLeagueDetails | `youthleaguedetails.xml` |
199
204
  | YouthPlayerDetails | `youthplayerdetails.xml` |
200
205
  | YouthPlayerList | `youthplayerlist.xml` |
201
206
  | YouthTeamDetails | `youthteamdetails.xml` |
@@ -17,7 +17,8 @@ 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)
21
22
  from pychpp.models.custom import (ht_team, ht_arena, ht_user, ht_region, ht_youth_team, ht_player,
22
23
  ht_league_unit, ht_youth_player, ht_league, ht_matches_archive,
23
24
  ht_match, ht_challenge, ht_match_lineup, ht_transfer_history)
@@ -982,6 +983,42 @@ class CHPPXml(CHPPBase):
982
983
  chpp=self, player_id=player_id, **kwargs,
983
984
  )
984
985
 
986
+ def xml_transfer_search(
987
+ self, age_min: int, age_max: int, skill_type_1: int, min_skill_value_1: int,
988
+ max_skill_value_1: int, age_days_min: int = None, age_days_max: int = None,
989
+ skill_type_2: int = None, min_skill_value_2: int = None, max_skill_value_2: int = None,
990
+ skill_type_3: int = None, min_skill_value_3: int = None, max_skill_value_3: int = None,
991
+ skill_type_4: int = None, min_skill_value_4: int = None, max_skill_value_4: int = None,
992
+ specialty: int = None, native_country_id: int = None,
993
+ tsi_min: int = None, tsi_max: int = None, price_min: int = None, price_max: int = None,
994
+ page_size: int = None, page_index: int = None, **kwargs,
995
+ ) -> transfer_search.TransferSearch:
996
+
997
+ return transfer_search.TransferSearch(
998
+ chpp=self,
999
+ age_min=age_min, age_days_min=age_days_min,
1000
+ age_max=age_max, age_days_max=age_days_max,
1001
+ skill_type_1=skill_type_1,
1002
+ min_skill_value_1=min_skill_value_1, max_skill_value_1=max_skill_value_1,
1003
+ skill_type_2=skill_type_2,
1004
+ min_skill_value_2=min_skill_value_2, max_skill_value_2=max_skill_value_2,
1005
+ skill_type_3=skill_type_3,
1006
+ min_skill_value_3=min_skill_value_3, max_skill_value_3=max_skill_value_3,
1007
+ skill_type_4=skill_type_4,
1008
+ min_skill_value_4=min_skill_value_4, max_skill_value_4=max_skill_value_4,
1009
+ specialty=specialty, native_country_id=native_country_id,
1010
+ tsi_min=tsi_min, tsi_max=tsi_max, price_min=price_min, price_max=price_max,
1011
+ page_size=page_size, page_index=page_index, **kwargs,
1012
+ )
1013
+
1014
+ def xml_transfers_player(
1015
+ self, player_id: int, **kwargs,
1016
+ ) -> transfers_player.TransfersPlayer:
1017
+
1018
+ return transfers_player.TransfersPlayer(
1019
+ chpp=self, player_id=player_id, **kwargs,
1020
+ )
1021
+
985
1022
  def xml_transfers_team(
986
1023
  self, team_id: int = None, page_index: int = None, **kwargs,
987
1024
  ) -> transfers_team.TransfersTeam:
@@ -1023,6 +1060,26 @@ class CHPPXml(CHPPBase):
1023
1060
  league_id=league_id, **kwargs,
1024
1061
  )
1025
1062
 
1063
+ def xml_world_languages(self, **kwargs) -> world_languages.WorldLanguages:
1064
+
1065
+ return world_languages.WorldLanguages(chpp=self, **kwargs)
1066
+
1067
+ def xml_youth_avatars(
1068
+ self, youth_team_id: int = None, **kwargs,
1069
+ ) -> youth_avatars.YouthAvatars:
1070
+
1071
+ return youth_avatars.YouthAvatars(
1072
+ chpp=self, youth_team_id=youth_team_id, **kwargs,
1073
+ )
1074
+
1075
+ def xml_youth_league_details(
1076
+ self, youth_league_id: int = None, **kwargs,
1077
+ ) -> youth_league_details.YouthLeagueDetails:
1078
+
1079
+ return youth_league_details.YouthLeagueDetails(
1080
+ chpp=self, youth_league_id=youth_league_id, **kwargs,
1081
+ )
1082
+
1026
1083
  def xml_youth_player_details(
1027
1084
  self, action_type: str = None, youth_player_id: int = None,
1028
1085
  show_scout_call: bool = None, show_last_match: bool = None,
@@ -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,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')
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pychpp"
3
- version = "0.4.8"
3
+ version = "0.4.9"
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