Hello, Can you help me? I have a question.I am beg...
# getting-started
j
Hello, Can you help me? I have a question.I am beginner. I have to make a list of castles around 50km. How do I do this to be used API.
k
You need to give us a bit more information...
h
Impossible to answer with the information provided. Do you have a class representing castles you could provide?
j
The city is Bratislava.In the list should be the name of the castle, distance and photo.
I don't have a class.
h
Are you looking for something like this?
Copy code
data class Castle(val name: String, val distance: Double)
val castles = // ...parse the list into castles
castles.filter { it.distance <= 50 }
j
It should use the API
h
What API?
j
Google Places API
m
Homework? stackoverflow?
j
Yes
stackoverflow 8
m
Feel free to come back if you have questions about Kotlin as a language or tools around Kotlin. Currently, you’re asking for algorithm help, so that’s what Stackoverflow, and other research/resources are for.