#Uber Journey Planner in Go language consumer normal dynamic Uber APIs.

It is a journey planning software, constructed as a continuation to REST API CRUD operations utilizing GO Language. On this software, we use the identical database that comprises the locations entered within the undertaking talked about above.

The entire function of this software is to compute probably the most environment friendly spherical journey route in time period of the associated fee and length from the place to begin by way of intermediate factors as chosen by the consumer.

Right here utilizing the POST command, we’re discovering an optimum path relying on the shortest distance. The consumer gives the id of the beginning location and the intermediate id’s of the locations to be travelled.

{

"starting_from_location_id" : "5629da8f18683bb841ef075d",

"location_ids" : ["5649518d66bae33b8883d654","5649511466bae33b8883d653","5649522c66bae33b8883d655","5649527e66bae33b8883d656"]
}

The appliance makes use of Uber dynamic worth estimate api to supply the full price and the time taken in ranging from the beginning location, making a spherical journey.

{

"id": "5666373d66bae316887f04ac",

"Standing": "processing",

"Starting_from_location_id": "5629da8f18683bb841ef075d",

"Best_route_location_ids": [

"5649511466bae33b8883d653",

"5649527e66bae33b8883d656",

"5649522c66bae33b8883d655",

"5649518d66bae33b8883d654",

""
],

"Total_uber_costs": 162,

"Total_uber_duration": 12279,

"Total_distance": 110.55000000000001

}

As every file within the database is saved with a singular ID, this perform solely retrieves the file on offering the Id within the hyperlink

Right here, we begin the journey by requesting UBER for the primary vacation spot. You’ll name UBER request API to request a automotive from place to begin to the following vacation spot.


{ "Id": "5666373d66bae316887f04ac", "Standing": "processing", "Starting_from_location_id": "5629da8f18683bb841ef075d", "Next_destination_location_id": "5649527e66bae33b8883d656", "Best_route_location_ids": [ "5649511466bae33b8883d653", "5649527e66bae33b8883d656", "5649522c66bae33b8883d655", "5649518d66bae33b8883d654", "" ], "Total_uber_costs": 162, "Total_uber_duration": 12279, "Total_distance": 110.55000000000001, "Uber_wait_time_eta": 2 }

{ "Id": "5666373d66bae316887f04ac", "Standing": "processing", "Starting_from_location_id": "5629da8f18683bb841ef075d", "Next_destination_location_id": "5649522c66bae33b8883d655", "Best_route_location_ids": [ "5649511466bae33b8883d653", "5649527e66bae33b8883d656", "5649522c66bae33b8883d655", "5649518d66bae33b8883d654", "" ], "Total_uber_costs": 162, "Total_uber_duration": 12279, "Total_distance": 110.55000000000001, "Uber_wait_time_eta": 2 }

{ "Id": "5666373d66bae316887f04ac", "Standing": "accomplished", "Starting_from_location_id": "5629da8f18683bb841ef075d", "Next_destination_location_id": "5649518d66bae33b8883d654", "Best_route_location_ids": [ "5649511466bae33b8883d653", "5649527e66bae33b8883d656", "5649522c66bae33b8883d655", "5649518d66bae33b8883d654", "" ], "Total_uber_costs": 162, "Total_uber_duration": 12279, "Total_distance": 110.55000000000001, "Uber_wait_time_eta": 2 }```

Leave a Reply

Your email address will not be published. Required fields are marked *