February 2018
Intermediate to advanced
356 pages
9h 10m
English
If we want to consume the Twitter APIs asynchronously and reactively, then we should create the API client. Before we code the client, we need to create our classes for modeling, according to our requirements.
We do not need all Tweets' attributes. We expect the following attributes:
Then, we will model our class based on the attributes listed.
Let's start with the user attribute. This attribute is a JSON attribute, and we will create a separated class for that. The class should look like this:
@JsonIgnoreProperties(ignoreUnknown = true)data class TwitterUser(val id:String,val name:String)
We have used the Kotlin data class, it fits our use case well, and we want to use that as ...