First use below command to download dependencies and compile the program
$mvn clean install
or else you can directly download the jar file and you can skip this step
eg:
Then use below command to run the program Note(program will take three command-line argument i.e route,stop,direction)
$java -jar bus-route-0.0.1-SNAPSHOT.jar "BUS ROUTE" "BUS STOP NAME" "DIRECTION"
eg:java -jar bus-route-0.0.1-SNAPSHOT.jar 5 77PO north
The libraries and imports used are as follows:
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import com.google.gson.*;
This program returns the time in minutes for a bus on "BUS ROUTE" leaving from "BUS STOP NAME" going "DIRECTION" using the API at http://svc.metrotransit.org/
value