Feat/ccrama force sr_detail#5
Conversation
|
Sorry for the .idea changes being included in the PR, I think .idea should potentially be gitignored. I can revert those if you'd like |
|
I'll try to give it a look tomorrow. |
KirkBushman
left a comment
There was a problem hiding this comment.
I noted some stuff to change, but overall good job.
| <project version="4"> | ||
| <component name="CompilerConfiguration"> | ||
| <bytecodeTargetLevel target="14" /> | ||
| <bytecodeTargetLevel target="1.8" /> |
There was a problem hiding this comment.
As you said I should remove the .idea folder, I used it mainly to sync between computers. I'm trying to add some features at the moment, after that's done, I'll try to clean up stuff. Both in code and in project.
In the meantime I would revert this, please.
| @@ -0,0 +1,10 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Revert this as well, please.
| @@ -0,0 +1,46 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <project version="4"> | |||
There was a problem hiding this comment.
Revert this as well, please.
| </configurations> | ||
| </component> | ||
| <component name="ProjectRootManager" version="2" languageLevel="JDK_14_PREVIEW" default="false" project-jdk-name="11" project-jdk-type="JavaSDK"> | ||
| <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
There was a problem hiding this comment.
Revert this as well, please.
| @Query("after") after: String? = null, | ||
| @Query("before") before: String? = null, | ||
| @Query("raw_json") rawJson: Int? = null, | ||
| @Query("sr_detail") srDetail: Int = 1, |
There was a problem hiding this comment.
Make the type nullable and the default null, please.
| @Query("after") after: String? = null, | ||
| @Query("before") before: String? = null, | ||
| @Query("raw_json") rawJson: Int? = null, | ||
| @Query("sr_detail") srDetail: Int = 1, |
There was a problem hiding this comment.
Make the type nullable and the default null, please.
| @Query("after") after: String? = null, | ||
| @Query("before") before: String? = null, | ||
| @Query("raw_json") rawJson: Int? = null, | ||
| @Query("sr_detail") srDetail: Int = 1, |
There was a problem hiding this comment.
Make the type nullable and the default null, please.
| @Query("after") after: String? = null, | ||
| @Query("before") before: String? = null, | ||
| @Query("raw_json") rawJson: Int? = null, | ||
| @Query("sr_detail") srDetail: Int = 1, |
There was a problem hiding this comment.
Make the type nullable and the default null, please.
| val publicDescription: String?, | ||
|
|
||
| @Json(name = "user_is_subscriber") | ||
| val userIsSubscriber: Boolean? |
There was a problem hiding this comment.
Convert the naming into isSubscriber, isMuted like the rest, please
| override val gildings: Gildings, | ||
|
|
||
| @Json(name = "sr_detail") | ||
| val sr_detail: SrDetail?, |
There was a problem hiding this comment.
Use camel case for the variable name here, otherwise detekt will error the build in Travis. Move it to srDetail, please.
Hello!
sr_detail adds subreddit information including images, descriptions, and user details to any t3 json object returned by the Reddit API.
This PR adds a new SrDetail object to the Submission model. This also forces the sr_detail=1 query parameter on applicable endpoints.
I don't know how you feel about having this as a non-optional parameter, although it doesn't change any behavior from the API except adding additional information to the response.
~ Carlos