Absolute beginner with both the Mapbox API and the Django Framework here. I'm working on a school project where i want to create an App that helps you to reduce your ecological footprint. For that purpose, i wanted to display sort of an "EcoValue" which is calculated by the distance you travel and the method of transportation you use.
My plan was to use Mapbox GL with the directions-plugin to let a user choose a route and then get the value of the length of the route to calculate said EcoValue.
Question: How can i retrieve the data i need? In the documentation i saw a Response JSON being generated but i cannot get behind on how i "intercept" the Request to get the data of the length, duration and method of transportation.
Any nudge in the right direction is much appreciated!