[Mapper] Map FIFA 23 Match Result, Squad Battles, and Startup Endpoints #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Add mapper entries for FIFA 23 match submission, Squad Battles, and the
usermassinfostartup bundle. These are needed for the game to record results, advance Squad Battles rank, and display the FUT hub.EA → Core Endpoint Table
POST /ut/game/fut/game/rPOST /matches/resultPOST /ut/game/fut/squadbattle/resultPOST /matches/result(mode=squad_battles)GET /ut/game/fut/squadbattle/opponentsGET /squad-battles/opponentsGET /ut/game/fut/usermassinfoGET /clubGET /ut/game/fut/squads/userGET /squadImplementation Steps
1. Map match result in
src/mapper.rs2. Map Squad Battles result with mode injection
Extend
MappedRoutewith an optionalextra_bodyfield if it does not already exist:Then:
In
src/proxy.rs, when forwarding, mergeextra_bodyinto the request JSON before sending to Core.3. Map Squad Battles opponents
4. Map
usermassinfo(critical startup endpoint)5. Map squad list
6. Add match result shaper in
src/shaper.rsEA expects a specific ACK envelope for match submission:
7. Add
usermassinfoshaperusermassinfois a large startup bundle. Build a minimal but valid version from the Core/clubresponse:Expand this envelope as real capture data reveals more required fields.
8. Register all new shapers in
src/proxy.rs9. Add mapper unit tests
map_request("POST", "/ut/game/fut/game/r")→POST /matches/result, no extra bodymap_request("POST", "/ut/game/fut/squadbattle/result")→POST /matches/resultwithextra_body.mode == "squad_battles"map_request("GET", "/ut/game/fut/squadbattle/opponents")→GET /squad-battles/opponentsmap_request("GET", "/ut/game/fut/usermassinfo")→GET /club10. Add shaper unit tests
shape_match_result(core_resp)→ hasresultCode: 200anduserInfo.coinsshape_usermassinfo(club)→ hasuserInfo.creditsmatchingclub.coinsAcceptance Criteria
mode: squad_battlesmerged into bodyusermassinfois mapped and shaped into a valid EA envelopecargo clippy -- -D warningspasses