             "✅  Matched \(photoName) taken on \(photoDate)",
             "(\(candidates.count) candidates)"
         )
-        let flickrPhotoSummary = matches[0]
-
-        guard let flickrPhoto = api.call(
-            method: "flickr.photos.getInfo",
-            parameters: [
-                "photo_id": flickrPhotoSummary.id
-        ])?["photo"] as? [String: Any] else {
-            continue
-        }
+        let flickrPhoto = api.getInfo(forPhoto: matches[0].id)
 
         setLocation(for: photo, from: flickrPhoto)
     }

    )
}

func setLocation(for photo: PhotosMediaItem, from flickrPhoto: [String: Any]) {
    if let locationJSON = flickrPhoto["location"] as? [String: Any],
        let latitudeString = locationJSON["latitude"] as? String,
        let flickrLatitude = Double(latitudeString),
        let longitudeString = locationJSON["longitude"] as? String,
        let flickrLongitude = Double(longitudeString) {
        let flickrLocation = [
            flickrLatitude,
            flickrLongitude
        ]
        let newLocation = flickrLocation
        if let photoLocation = photo.location, !photoLocation.isEmpty {
            let distance = getCLLocation(for: flickrLocation).distance(
                from: getCLLocation(for: photoLocation)
            )
            let distanceFormatter = MKDistanceFormatter()

    } else {
        if let photoLocation = photo.location, !photoLocation.isEmpty {
            print("-   No location on flickr, but photo has location")
        } else if let tags = flickrPhoto?.tags {
            print("- ⛔️  No location on flickr")
            print(tags)
        }
    }
}
