[Mapper] Map FIFA 23 Objectives and SBC Endpoints #3
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 in
src/mapper.rsand response shapers insrc/shaper.rsfor the Objectives and SBC endpoints that EA uses in FIFA 23 FUT.EA → Core Endpoint Table
GET /ut/game/fut/user/dynamicobjectivesGET /objectivesPOST /ut/game/fut/user/dynamicobjectives/{id}/milestones/{m}/claimPOST /objectives/:id/claimGET /ut/game/fut/sbs/challengesGET /sbcPOST /ut/game/fut/sbs/challenges/{id}/sets/{setId}/tradePOST /sbcGET /ut/game/fut/sbs/challenges/{id}GET /sbc/:idImplementation Steps
1. Add objectives routes to
src/mapper.rsIn the
map_requestfunction:2. Add SBC routes to
src/mapper.rs3. Add response shaping in
src/shaper.rsObjectives — shape Core's response into the EA envelope:
SBC list:
SBC claim:
4. Register shapers in
src/proxy.rsAdd the new endpoint paths to the shaper dispatch table alongside the existing auth/squad/pack entries.
5. Add mapper unit tests
In
tests/mapper_tests.rs(or existing mapper test file):map_request("GET", "/ut/game/fut/user/dynamicobjectives")→GET /objectivesmap_request("POST", "/ut/game/fut/user/dynamicobjectives/obj_1/milestones/1/claim")→POST /objectives/obj_1/claimmap_request("GET", "/ut/game/fut/sbs/challenges")→GET /sbcmap_request("POST", "/ut/game/fut/sbs/challenges/sbc_1/sets/1/trade")→POST /sbcmap_request("GET", "/ut/game/fut/sbs/challenges/sbc_1")→GET /sbc/sbc_16. Add shaper unit tests
shape_objectives(core_json)→ result haschallengeskeyshape_sbc_list(core_json)→ result hasSBCSetSummary.challengeskeyAcceptance Criteria
cargo clippy -- -D warningspasses