Define network data models for the WorldCup matches API + JSON deserialization
Categories
(Firefox for Android :: Homepage, task)
Tracking
()
People
(Reporter: skhan, Assigned: skhan)
References
Details
(Whiteboard: [fxdroid][group3][world-cup-phase2])
Attachments
(4 external files)
Add Kotlin data classes (using @Serializable or the project's existing JSON parsing convention) mapping the /api/v1/worldcup/matches response:
- MatchesResponse with previous, current, and next lists of EventInfo
- EventInfo covering all fields: date, global_event_id, home_team, away_team, period, home_score, away_score, home_extra, away_extra, home_penalty, away_penalty, clock, updated, status, status_type, sport
- TeamInfo with key, global_team_id, name, region, icon, group, eliminated
Add a MatchesResponseMapper that converts DTOs → domain models (SportsMatch,
SportsTeam, MatchStatus). UTC date strings converted to device local timezone.
status_type ("past", "live", "scheduled", "unknown") drives the primary
MatchStatus bucketing; the detailed status field drives sub-states
(Delayed, Postponed, etc.).
Unit tests against representative captured API responses covering both
response shapes and all nullable field combinations.
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Original Revision: https://phabricator.services.mozilla.com/D300183
Original Revision: https://phabricator.services.mozilla.com/D300183
Original Revision: https://phabricator.services.mozilla.com/D300183
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 8•5 months ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Updated•5 months ago
|
Description
•