PokeAPI / pokekotlin

Kotlin (or Java, Scala, etc) client for PokeApi
Apache License 2.0
171 stars 43 forks source link

Convenience method for lists #42

Closed sargunv closed 8 years ago

sargunv commented 8 years ago

Code like this is very common:

client.getMoveList(offset = 0, limit = service.getMoveList(0, 0).count)

There should be a convenience function for each resource list that takes no parameters and returns the full list via the above.

fun getMoveList() = getMoveList(0, getMoveList(0, 0).count)
sargunv commented 8 years ago

Part of the new Skaffold data source in 2.2.0. Documentation to come later.