Skip to content

FleetEvent should have a different data model #9

@codlab

Description

@codlab

Currently returned events are constructed through the following json representation :

    {
        "data_mission_type": 1,
        "data_return_flight": false,
        "data_arrival_time": 1417982628,
        "originFleet": "Uncreative name",
        "coordsOrigin": "[1:142:9]",
        "destFleet": "Gay Pride UK",
        "destCoords": "[1:142:8]",
        "fleetResources": {
            "Small Cargo": 69,
            "metal": 0,
            "crystal": 0,
            "deuterium": 0
        }
    }

For more i18n consistency since the servers can be in French, German, English, etc... and ships are not available through their identifier but directly through raw "translated" names. We should have :

    {
        "data_mission_type": 1,
        "data_return_flight": false,
        "data_arrival_time": 1417982628,
        "originFleet": "Uncreative name",
        "coordsOrigin": "[1:142:9]",
        "destFleet": "Gay Pride UK",
        "destCoords": "[1:142:8]",
        "fleetResources": {
            "ships": [
                {
                    "name":"Small Cargo",
                    "card": 69,
                }
            ],
            "metal": 0,
            "crystal": 0,
            "deuterium": 0
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions