pychpp 0.4.3__tar.gz → 0.4.4__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.
- {pychpp-0.4.3 → pychpp-0.4.4}/PKG-INFO +39 -38
- {pychpp-0.4.3 → pychpp-0.4.4}/README.md +38 -37
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/chpp.py +8 -1
- pychpp-0.4.4/pychpp/models/xml/league_levels.py +44 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pyproject.toml +1 -1
- {pychpp-0.4.3 → pychpp-0.4.4}/LICENSE +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/fixtures/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/fixtures/ht_datetime.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/fixtures/ht_error.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_arena.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_country.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_league.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_league_unit.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_match.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_player.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_region.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_team.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/base/ht_user.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_arena.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_challenge.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_league.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_league_unit.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_match.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_match_lineup.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_matches_archive.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_player.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_region.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_team.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_transfer_history.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_user.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_youth_player.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/custom/ht_youth_team.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/ht_field.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/ht_init_var.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/ht_model.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/ht_version.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/ht_xml.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/__init__.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/achievements.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/alliance_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/alliances.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/arena_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/avatars.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/bookmarks.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/challenges.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/club.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/cup_matches.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/current_bids.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/economy.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/fans.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/hof_players.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/ladder_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/ladder_list.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/league_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/league_fixtures.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/manager_compendium.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/match_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/match_lineup.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/matches_archive.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/national_team_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/national_teams.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/player_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/players.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/region_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/team_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/training.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/transfers_team.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/world_cup.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/world_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/youth_player_details.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/pychpp/models/xml/youth_player_list.py +0 -0
- {pychpp-0.4.3 → pychpp-0.4.4}/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.
|
|
3
|
+
Version: 0.4.4
|
|
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,46 +165,47 @@ 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
|
-

|
|
169
169
|
|
|
170
170
|
The following table shows the CHPP XML files that are currently supported:
|
|
171
171
|
|
|
172
|
-
|
|
|
173
|
-
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
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
|
+
| ManagerCompendium | `managercompendium.xml` |
|
|
193
|
+
| MatchDetails | `matchdetails.xml` |
|
|
194
|
+
| MatchLineup | `matchlineup.xml` |
|
|
195
|
+
| MatchesArchive | `matchesarchive.xml` |
|
|
196
|
+
| NationalTeamDetails | `nationalteamdetails.xml` |
|
|
197
|
+
| NationalTeams | `nationalteams.xml` |
|
|
198
|
+
| PlayerDetails | `playerdetails.xml` |
|
|
199
|
+
| Players | `players.xml` |
|
|
200
|
+
| RegionDetails | `regiondetails.xml` |
|
|
201
|
+
| TeamDetails | `teamdetails.xml` |
|
|
202
|
+
| Training | `training.xml` |
|
|
203
|
+
| TransfersTeam | `transfersteam.xml` |
|
|
204
|
+
| WorldCup | `worldcup.xml` |
|
|
205
|
+
| WorldDetails | `worlddetails.xml` |
|
|
206
|
+
| YouthPlayerDetails | `youthplayerdetails.xml` |
|
|
207
|
+
| YouthPlayerList | `youthplayerlist.xml` |
|
|
208
|
+
| YouthTeamDetails | `youthteamdetails.xml` |
|
|
208
209
|
|
|
209
210
|
## License
|
|
210
211
|
pyCHPP is licensed under the Apache License 2.0.
|
|
@@ -143,46 +143,47 @@ 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
|
-

|
|
147
147
|
|
|
148
148
|
The following table shows the CHPP XML files that are currently supported:
|
|
149
149
|
|
|
150
|
-
|
|
|
151
|
-
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
|
|
|
185
|
-
|
|
|
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
|
+
| ManagerCompendium | `managercompendium.xml` |
|
|
171
|
+
| MatchDetails | `matchdetails.xml` |
|
|
172
|
+
| MatchLineup | `matchlineup.xml` |
|
|
173
|
+
| MatchesArchive | `matchesarchive.xml` |
|
|
174
|
+
| NationalTeamDetails | `nationalteamdetails.xml` |
|
|
175
|
+
| NationalTeams | `nationalteams.xml` |
|
|
176
|
+
| PlayerDetails | `playerdetails.xml` |
|
|
177
|
+
| Players | `players.xml` |
|
|
178
|
+
| RegionDetails | `regiondetails.xml` |
|
|
179
|
+
| TeamDetails | `teamdetails.xml` |
|
|
180
|
+
| Training | `training.xml` |
|
|
181
|
+
| TransfersTeam | `transfersteam.xml` |
|
|
182
|
+
| WorldCup | `worldcup.xml` |
|
|
183
|
+
| WorldDetails | `worlddetails.xml` |
|
|
184
|
+
| YouthPlayerDetails | `youthplayerdetails.xml` |
|
|
185
|
+
| YouthPlayerList | `youthplayerlist.xml` |
|
|
186
|
+
| YouthTeamDetails | `youthteamdetails.xml` |
|
|
186
187
|
|
|
187
188
|
## License
|
|
188
189
|
pyCHPP is licensed under the Apache License 2.0.
|
|
@@ -13,7 +13,7 @@ from pychpp.models.xml import (manager_compendium, team_details, achievements, a
|
|
|
13
13
|
youth_player_details, youth_team_details, youth_player_list,
|
|
14
14
|
matches_archive, match_details, cup_matches, alliances,
|
|
15
15
|
alliance_details, avatars, bookmarks, club, current_bids, economy,
|
|
16
|
-
fans, hof_players, ladder_details, ladder_list)
|
|
16
|
+
fans, hof_players, ladder_details, ladder_list, league_levels)
|
|
17
17
|
from pychpp.models.custom import (ht_team, ht_arena, ht_user, ht_region, ht_youth_team, ht_player,
|
|
18
18
|
ht_league_unit, ht_youth_player, ht_league, ht_matches_archive,
|
|
19
19
|
ht_match, ht_challenge, ht_match_lineup, ht_transfer_history)
|
|
@@ -633,6 +633,13 @@ class CHPPXml(CHPPBase):
|
|
|
633
633
|
chpp=self, league_level_unit_id=league_level_unit_id, season=season, **kwargs,
|
|
634
634
|
)
|
|
635
635
|
|
|
636
|
+
def xml_league_levels(self, league_id: int = None, **kwargs,
|
|
637
|
+
) -> league_levels.LeagueLevels:
|
|
638
|
+
|
|
639
|
+
return league_levels.LeagueLevels(
|
|
640
|
+
chpp=self, league_id=league_id, **kwargs,
|
|
641
|
+
)
|
|
642
|
+
|
|
636
643
|
def xml_manager_compendium(
|
|
637
644
|
self, user_id: int = None, **kwargs,
|
|
638
645
|
) -> manager_compendium.ManagerCompendium:
|
|
@@ -0,0 +1,44 @@
|
|
|
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 RequestLeagueLevels(HTModel):
|
|
9
|
+
"""
|
|
10
|
+
League Levels - Request arguments
|
|
11
|
+
"""
|
|
12
|
+
SOURCE_FILE = 'leaguelevels'
|
|
13
|
+
LAST_VERSION = '1.0'
|
|
14
|
+
|
|
15
|
+
_r_league_id: Optional[int] = HTInitVar('LeagueID', init_arg='league_id')
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class LeagueLevels(RequestLeagueLevels):
|
|
19
|
+
"""
|
|
20
|
+
League Levels
|
|
21
|
+
"""
|
|
22
|
+
id: int = HTField('LeagueID')
|
|
23
|
+
season: int = HTField('Season')
|
|
24
|
+
nr_of_league_levels: int = HTField('NrOfLeagueLevels')
|
|
25
|
+
levels: List['LeagueLevelItem'] = HTField('LeagueLevelList', items='LeagueLevelItem')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class LeagueLevelItem(HTModel):
|
|
29
|
+
"""
|
|
30
|
+
League Levels -> Levels -> League Level item
|
|
31
|
+
"""
|
|
32
|
+
league_level: int = HTField('LeagueLevel')
|
|
33
|
+
nr_of_league_level_units: int = HTField('NrOfLeagueLevelUnits')
|
|
34
|
+
nr_of_teams: int = HTField('NrOfTeams')
|
|
35
|
+
league_level_unit_id_list: str = HTField('LeagueLevelUnitIdList')
|
|
36
|
+
nr_of_shared_promotion_slots_per_series: int = HTField('NrOfSharedPromotionSlotsPerSeries')
|
|
37
|
+
nr_of_direct_promotion_slots_per_series: int = HTField('NrOfDirectPromotionSlotsPerSeries')
|
|
38
|
+
nr_of_qualification_promotion_slots_per_series: int = HTField(
|
|
39
|
+
'NrOfQualificationPromotionSlotsPerSeries',
|
|
40
|
+
)
|
|
41
|
+
nr_of_direct_demotion_slots_per_series: int = HTField('NrOfDirectDemotionSlotsPerSeries')
|
|
42
|
+
nr_of_qualification_demotion_slots_per_series: int = HTField(
|
|
43
|
+
'NrOfQualificationDemotionSlotsPerSeries',
|
|
44
|
+
)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|