interview-tech-challenge> mvn clean package
interview-tech-challenge-main> sh ./localBuildAndRun.sh
...
[main] INFO org.lotlinx.interview.MainServerVerticle - MainVerticle started
[vert.x-eventloop-thread-0] INFO org.lotlinx.interview.MainServerVerticle - HTTP server started on port 8080
GET/getCurrentAirPollution?latitude={lat}&longitude={lon}
Gets current air pollution details for given latitude and longitude
name type data type description latituderequired int Latitude longituderequired int Longitude
http code content-type 200application/json
{
"coord": {
"lon": -79.6483,
"lat": 43.5882
},
"list": [{
"main": {
"aqi": 2
},
"components": {
"co": 207.04,
"no": 2.4,
"no2": 11.71,
"o3": 52.68,
"so2": 3.34,
"pm2_5": 15.93,
"pm10": 18.17,
"nh3": 0.99
},
"dt": 1760450622
}]
}curl http://localhost:8080/getCurrentAirPollution?latitude=43.588216&longitude=-79.648311
GET /weather/cities?names={name1,name2}
Gets current weather for a given list of comma seperated values
name type data type description namesrequired string, (comma seperated) Url encoded CSV values for names.
e.g names=london,new%20york
http code content-type 200application/json
[
{
"cityName": "New York",
"countryCode": "US",
"latitude": 40.7127,
"longitude": -74.006,
"weather_condition": "Drizzle",
"weather_description": "light intensity drizzle",
"temp_unit": "Celsius",
"temp": 13.1,
"feels_like": 12.74,
"temp_min": 12.19,
"temp_max": 14.01,
"wind_speed": 7.2,
"sunrise": "2025-10-14 07:06:08",
"sunset": "2025-10-14 18:17:28",
"timezone": "UTC-04:00"
},
{
"cityName": "Mississauga",
"countryCode": "CA",
"latitude": 43.5896,
"longitude": -79.6444,
"weather_condition": "Clouds",
"weather_description": "few clouds",
"temp_unit": "Celsius",
"temp": 13.34,
"feels_like": 12.95,
"temp_min": 12.12,
"temp_max": 15.79,
"wind_speed": 0.45,
"sunrise": "2025-10-14 07:31:34",
"sunset": "2025-10-14 18:37:07",
"timezone": "UTC-04:00"
}
]curl http://localhost:8080/weather/cities?names=new%20york,mississauga
GET /weather/details?latitude={lat}&longitude={lon}
Gets detailed weather info for given latitude and longitude
name type data type description latituderequired int Latitude longituderequired int Longitude
http code content-type 200application/json
{
"coord": {
"lon": -79.6483,
"lat": 43.5882
},
"weather": [
{
"id": 801,
"main": "Clouds",
"description": "few clouds",
"icon": "02d"
}
],
"base": "stations",
"main": {
"temp": 13.32,
"feels_like": 12.93,
"temp_min": 12.1,
"temp_max": 15.78,
"pressure": 1024,
"humidity": 85,
"sea_level": 1024,
"grnd_level": 1006
},
"visibility": 10000,
"wind": {
"speed": 0.45,
"deg": 272,
"gust": 1.34
},
"clouds": {
"all": 20
},
"dt": 1760450631,
"sys": {
"type": 2,
"id": 2020569,
"country": "CA",
"sunrise": 1760441495,
"sunset": 1760481429
},
"timezone": -14400,
"id": 6075357,
"name": "Mississauga",
"cod": 200
}curl http://localhost:8080/weather/details?latitude=43.588216&longitude=-79.648311
GET/geocode/coordinates?name={locationName}
Gets the latitude & longitude for a given location
name type data type description namerequired string Name of the location or city.
http code content-type 200application/json
[
{
"name": "Mississauga",
"local_names": {
"it": "Mississauga",
"ru": "Миссиссога",
"de": "Mississauga",
"en": "Mississauga",
"es": "Mississauga",
"fr": "Mississauga"
},
"lat": 43.5896231,
"lon": -79.6443879,
"country": "CA",
"state": "Ontario"
}
]curl http://localhost:8080/geocode/coordinates?name=mississauga