Closed Bug 2037227 Opened 6 months ago Closed 6 months ago

Define network data models for the WorldCup matches API + JSON deserialization

Categories

(Firefox for Android :: Homepage, task)

All
Android
task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox151 --- fixed
firefox152 --- fixed

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.

Summary: Define network data models for the WorldCup matches API → Define network data models for the WorldCup matches API + JSON deserialization
Depends on: 2033590
Depends on: 2033595
No longer depends on: 2033595
Blocks: 2037244
Whiteboard: [fxdroid][group3][world-cup-phase2]
Assignee: nobody → skhan
Status: NEW → ASSIGNED
Attachment #9585785 - Attachment description: Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals → WIP: Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals
Attachment #9585785 - Attachment description: WIP: Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals → Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals
Pushed by skhan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/38b098c1133c https://hg.mozilla.org/integration/autoland/rev/407c8e867528 Create DTOs and mapper to convert them into sports domain modals r=android-reviewers,ohall,moyin
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Blocks: 2040825
Blocks: 2041156
Attachment #9591752 - Attachment description: WIP: Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals → Bug 2037227 - Create DTOs and mapper to convert them into sports domain modals
Attachment #9591752 - Flags: approval-mozilla-release+

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)

QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: