Skip to content

Instantly share code, notes, and snippets.

@CostaFot
Last active March 31, 2019 13:49
Show Gist options
  • Save CostaFot/152c2146d3db35a158d86537500db20f to your computer and use it in GitHub Desktop.
Save CostaFot/152c2146d3db35a158d86537500db20f to your computer and use it in GitHub Desktop.
/**
* The class representing the Json response. Use http://www.jsonschema2pojo.org/ to get this.
* Or you can add this plugin for AS here https://plugins.jetbrains.com/plugin/9960-json-to-kotlin-class-jsontokotlinclass-
* It will create your data class from JSON to kotlin.
*
* Just writing "Any" cause I'm a terrible human being and don't care about the JSON in this case
*/
data class Movies(
@SerializedName("dates")
val dates: Any?,
@SerializedName("page")
val page: Int?,
@SerializedName("results")
val results: List<Any>?,
@SerializedName("total_pages")
val totalPages: Int?,
@SerializedName("total_results")
val totalResults: Int?
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment