-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from ttoklip/feat/#3_우리동네_화면_구현
Feat/#3 우리동네 화면 구현
- Loading branch information
Showing
31 changed files
with
697 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...java/com/umc/ttoklip/data/api/CommsApi.kt → .../umc/ttoklip/data/api/MainTogethersApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package com.umc.ttoklip.data.api | ||
|
||
interface CommsApi { | ||
interface MainTogethersApi { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/umc/ttoklip/data/model/town/CommsResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.umc.ttoklip.data.model.town | ||
|
||
data class CommsResponse( | ||
val communities: List<Comms> | ||
val communities: List<Communities> | ||
) |
5 changes: 3 additions & 2 deletions
5
.../com/umc/ttoklip/data/model/town/Comms.kt → ...mc/ttoklip/data/model/town/Communities.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package com.umc.ttoklip.data.model.town | ||
|
||
data class Comms( | ||
data class Communities( | ||
val id: Long, | ||
val title: String, | ||
val content: String, | ||
val commentCount: Long, | ||
val likeCount: Long, | ||
val scrapCount: Long | ||
val scrapCount: Long, | ||
val writer: String | ||
) |
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/umc/ttoklip/data/model/town/CreateCommentRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.umc.ttoklip.data.model.town | ||
|
||
data class CreateCommentRequest( | ||
val content: String, | ||
val comment: String, | ||
val parentCommentId: Long | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
package com.umc.ttoklip.data.model.town | ||
|
||
data class ImageUrl( | ||
val imageId: Long, | ||
val postImageUrl: String | ||
val imageUrl: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/umc/ttoklip/data/repository/town/MainCommsRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.umc.ttoklip.data.repository.town | ||
|
||
import com.umc.ttoklip.data.model.town.CommsResponse | ||
import com.umc.ttoklip.module.NetworkResult | ||
|
||
interface MainCommsRepository { | ||
suspend fun getComms(): NetworkResult<CommsResponse> | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/umc/ttoklip/data/repository/town/MainCommsRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.umc.ttoklip.data.repository.town | ||
|
||
import com.umc.ttoklip.data.api.MainCommsApi | ||
import com.umc.ttoklip.data.model.ResponseBody | ||
import com.umc.ttoklip.data.model.town.CommsResponse | ||
import com.umc.ttoklip.module.NetworkResult | ||
import com.umc.ttoklip.module.handleApi | ||
import javax.inject.Inject | ||
|
||
class MainCommsRepositoryImpl @Inject constructor(private val api: MainCommsApi) : | ||
MainCommsRepository { | ||
override suspend fun getComms(): NetworkResult<CommsResponse> { | ||
return handleApi({ api.commsList() }) { response: ResponseBody<CommsResponse> -> response.result } | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
app/src/main/java/com/umc/ttoklip/data/repository/town/MainTogethersRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.umc.ttoklip.data.repository.town | ||
|
||
interface MainTogethersRepository { | ||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/umc/ttoklip/data/repository/town/MainTogethersRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.umc.ttoklip.data.repository.town | ||
|
||
import com.umc.ttoklip.data.api.MainTogethersApi | ||
import javax.inject.Inject | ||
|
||
class MainTogethersRepositoryImpl @Inject constructor(private val api: MainTogethersApi) : | ||
MainTogethersRepository { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.