You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm picturing a class wrapping a HaloInfiniteClient instance, maybe HaloInfiniteResource, that is initialized similarly to the client but integrates calls to services and provides more opinionated responses. For example, it would be nice to request matches and have the names of playlists, maps, modes, and players returned (and less deeply nested) instead of asset IDs and version IDs that the user needs to understand how to process further.
The text was updated successfully, but these errors were encountered:
@aapokaapo I'm actually playing with returning the Pydantic models directly from the HaloInfiniteClient service methods.
A new MatchAPI class would wrap a client instance and have 2 methods, get_match and iter_match_history, which return/yield new models wrapping the current Pydantic models. The new models would provide convenience properties for more direct access to the match/stat/skill attributes.
Models might look like:
Match
match_id
start_time
map_name
...
teams
players
Team
team_id
name
kills
...
mmr
Player
player_id
gamertag
kills
...
csr_before
csr_after
What do you think?
I'd welcome a 2nd opinion if you are interested in reviewing a PR.
It is a bit tedious to have to first query for match_history, acquire a match_id and then get match_stats with that match_id and lastly acquire a map_asset_id and with that query the map_asset to get the map_name. Your suggestion sounds good to me.
I'll gladly review a PR.
I'm picturing a class wrapping a
HaloInfiniteClient
instance, maybeHaloInfiniteResource
, that is initialized similarly to the client but integrates calls to services and provides more opinionated responses. For example, it would be nice to request matches and have the names of playlists, maps, modes, and players returned (and less deeply nested) instead of asset IDs and version IDs that the user needs to understand how to process further.The text was updated successfully, but these errors were encountered: