open_route_service icon indicating copy to clipboard operation
open_route_service copied to clipboard

TODO: Make Metadata schema class and include it into every data model it's needed in.

Open Dhi13man opened this issue 3 years ago • 2 comments

Example metadata

{
    "metadata": {
        "attribution": "openrouteservice.org | OpenStreetMap contributors",
        "service": "matrix",
        "timestamp": 1632652598861,
        "query": {
            "locations": [
                [
                    9.70093,
                    48.477473
                ],
                [
                    9.207916,
                    49.153868
                ],
                [
                    37.573242,
                    55.801281
                ],
                [
                    115.663757,
                    38.106467
                ]
            ],
            "profile": "driving-car",
            "responseType": "json"
        },
        "engine": {
            "version": "6.6.1",
            "build_date": "2021-07-05T10:57:48Z",
            "graph_date": "2021-09-12T10:05:32Z"
        }
    }
}

Dhi13man avatar Sep 26 '21 10:09 Dhi13man

API Documentation

https://openrouteservice.org/dev/#/api-docs/

Potential Implementation steps

  1. Test out the various API endpoints and their responses. See how those responses correspond to encapsulated Data Model Classes in the package.
  2. See which responses include this metadata model.
  3. Make an ORSMetadata class and include it as a member of all the encapsulated classes of the package that need it as per the information from Step 1.

Dhi13man avatar Sep 28 '21 07:09 Dhi13man

Metadata -> query can be kept dynamic or Map<String, dynamic>

Dhi13man avatar Oct 02 '21 07:10 Dhi13man