Within Clean Architecture, the Remote layer allows us to abstract the remote source of data that our application uses. In this lesson, we’re going to begin building our remote layer by creating the data models for the data that we retrieve back from the external remote source.
Could anyone explain why do wo use @SerializedName annotation in OwnerModel and didn't use it in ProjectsResponseModel class?
Probably it should look like: ProjectsResponseModel(@SerializedName("items") val items: List) but it's not. Why?
If you've gotten this far into the course you may notice that Joe edits the videos and often apparently edits out errors that he makes while coding. I found that it's good practice to look over the source code offered in the attached link (if it exists) after each section and see if the code matches what he's typing in the video.
In this video there's an error in the video code that is not noted. Specifically the ProjectModel needs to have a id value. The model should be:
class ProjectModel(val id: String, val name: String,
@SerializedName("fullname") val fullName: String,
@SerializedName("stargazerscount") val starCount: Int,
@SerializedName("created_at") val dateCreated: String,
val owner: OwnerModel)
which is not what appears in the video.