Last active
May 20, 2018 01:44
-
-
Save kennyhorna/14deb8bfd18475fbfca99c6a141882d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let index = client.index(withName: "venues") | |
let query = Query(query: "La Bombonera") // acá seteas el término de búsqueda | |
query.aroundLatLng = LatLng(lat: 40.71, lng: -74.01) // acá seteas la ubicación | |
query.hitsPerPage = 10 // con esto se limita el tamaño de la respuesta | |
query.getRankingInfo = true // esto traerá información adicional como la distancia del local a la ubicación indicada | |
index.search(query, completionHandler: { (content, error) -> Void in | |
if error == nil { | |
print("Result: \(content!)") // aquí ya pintas la vista con la data recibida | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment