DAHITI.get_nearest_target()
Get nearest DAHITI target by given location
# Import package
from dahitiapi.DAHITI import DAHITI
# Initialize class
dahiti = DAHITI()
# Define arguments
longitude = 11.0
latitude = 49.0
# Get nearest DAHITI target by location
response = dahiti.get_nearest_target(longitude, latitude)
Returned response:
{
'id': 41724,
'target_name': 'Altmühl, River'
'location': None,
'continent': 'Europe',
'country': 'Germany',
'longitude': 11.0442,
'latitude': 48.8865,
'distance': 13.0269,
}