visheshrwl / Uber-like

2 stars 5 forks source link

Update TripResolver.ts #16

Closed Aryam2121 closed 1 day ago

Aryam2121 commented 1 day ago

API Call to Google Maps: We are making an API call to the Google Maps Directions API to get the route information, including traffic data (duration_in_traffic).

Handling Real-Time Traffic: The API request includes departure_time=now and traffic_model=best_guess to ensure real-time traffic data is considered.

Save Traffic Data in Trip: You might need to update your Trip entity to include fields such as trafficDuration and distance. Here’s how to adjust the Trip entity:

All Submissions:

Type of change

Please delete options that are not relevant.

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).
visheshrwl commented 1 day ago

@Aryam2121 amazing work. Consider starring the repo and hoping for more PR's from your side.