open_route_service
open_route_service copied to clipboard
TODO: Make Metadata schema class and include it into every data model it's needed in.
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"
}
}
}
API Documentation
https://openrouteservice.org/dev/#/api-docs/
Potential Implementation steps
- Test out the various API endpoints and their responses. See how those responses correspond to encapsulated Data Model Classes in the package.
- See which responses include this metadata model.
- 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.
Metadata -> query can be kept dynamic or Map<String, dynamic>