-
Notifications
You must be signed in to change notification settings - Fork 2
My code review suggestions #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,12 @@ package com.example.mymovieinfo.dto | |
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class Movie(@SerializedName("rank")var rank: Int, @SerializedName("title")var title: String, | ||
| @SerializedName("country") var country: String, @SerializedName("boxOfficeGross")var boxOfficeGross: Double, | ||
| @SerializedName("openingWeekendGross")var openingWeekendGross: Double, @SerializedName("distributor")var distributor: String){ | ||
| data class Movie(@SerializedName("Rank")var rank: Int, @SerializedName("Title")var title: String, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SerializedName value should match JSON data feed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Are these the names in the feed, with that capitalization? |
||
| @SerializedName("Country_of_origin") var country: String, @SerializedName("Box_office_gross")var boxOfficeGross: Double, | ||
| @SerializedName("Opening_Weekend_Gross")var openingWeekendGross: Double, @SerializedName("Distributor")var distributor: String){ | ||
|
|
||
| override fun toString(): String { | ||
| return title | ||
| return "$title" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kotlin shortcut in case you ever wanted to return more than just the movie title There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an extra step, if it's not actually a string. I'd leave it as it were, until more string details are needed. |
||
| } | ||
|
|
||
| } //End DataClass | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed dependency typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.