PokeAPI / pokekotlin

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

Restructure data model #51

Open sargunv opened 8 years ago

sargunv commented 8 years ago

Kotlin 1.1 is coming soon, which will include data class inheritance. The resource models can probably be reworked with this new feature, which will cause some minor breaking changes in edge cases.

Since there will be another major version bump for this, it's probably also a good time to see if there's any more breaking refactoring that should be done (although most of that was taken care of with 2.0.0).

Should see if NamedApiResource and ApiResource can get a generic parameter for the type of resource it's pointing to. Also should make NamedApiResource extend from ApiResource. Should also add a base class for all API objects since they all include an id and name.