From 744132fd7efae24a1262f7f93d0151e31854045d Mon Sep 17 00:00:00 2001 From: klaus Date: Sun, 21 Jun 2026 20:44:15 +0900 Subject: [PATCH] =?UTF-8?q?feat(creator):=20=EC=BB=A4=EB=AE=A4=EB=8B=88?= =?UTF-8?q?=ED=8B=B0=20=ED=83=AD=20API=20=EA=B3=84=EC=95=BD=EC=9D=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreatorChannelCommunityTabResponse.kt | 31 +++++++++++++++++++ .../creator/channel/data/CreatorChannelApi.kt | 9 ++++++ .../channel/data/CreatorChannelRepository.kt | 12 +++++++ 3 files changed, 52 insertions(+) create mode 100644 app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/data/CreatorChannelCommunityTabResponse.kt diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/data/CreatorChannelCommunityTabResponse.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/data/CreatorChannelCommunityTabResponse.kt new file mode 100644 index 00000000..371cc55c --- /dev/null +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/data/CreatorChannelCommunityTabResponse.kt @@ -0,0 +1,31 @@ +package kr.co.vividnext.sodalive.v2.creator.channel.community.data + +import androidx.annotation.Keep +import com.google.gson.annotations.SerializedName + +@Keep +data class CreatorChannelCommunityTabResponse( + @SerializedName("communityPostCount") val communityPostCount: Int, + @SerializedName("communityPosts") val communityPosts: List, + @SerializedName("page") val page: Int, + @SerializedName("size") val size: Int, + @SerializedName("hasNext") val hasNext: Boolean +) + +@Keep +data class CreatorChannelCommunityPostResponse( + @SerializedName("postId") val postId: Long, + @SerializedName("creatorId") val creatorId: Long, + @SerializedName("creatorNickname") val creatorNickname: String, + @SerializedName("creatorProfileUrl") val creatorProfileUrl: String, + @SerializedName("createdAtUtc") val createdAtUtc: String, + @SerializedName("content") val content: String, + @SerializedName("imageUrl") val imageUrl: String?, + @SerializedName("audioUrl") val audioUrl: String?, + @SerializedName("price") val price: Int, + @SerializedName("existOrdered") val existOrdered: Boolean, + @SerializedName("isCommentAvailable") val isCommentAvailable: Boolean, + @SerializedName("likeCount") val likeCount: Int, + @SerializedName("commentCount") val commentCount: Int, + @SerializedName("isPinned") val isPinned: Boolean +) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelApi.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelApi.kt index f28be282..453adaf6 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelApi.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelApi.kt @@ -4,6 +4,7 @@ import io.reactivex.rxjava3.core.Single import kr.co.vividnext.sodalive.common.ApiResponse import kr.co.vividnext.sodalive.v2.common.data.ContentSort import kr.co.vividnext.sodalive.v2.creator.channel.audio.data.CreatorChannelAudioTabResponse +import kr.co.vividnext.sodalive.v2.creator.channel.community.data.CreatorChannelCommunityTabResponse import kr.co.vividnext.sodalive.v2.creator.channel.live.data.CreatorChannelLiveTabResponse import kr.co.vividnext.sodalive.v2.creator.channel.series.data.CreatorChannelSeriesTabResponse import retrofit2.http.GET @@ -45,4 +46,12 @@ interface CreatorChannelApi { @Query("sort") sort: ContentSort, @Header("Authorization") authHeader: String ): Single> + + @GET("/api/v2/creator-channels/{creatorId}/community") + fun getCommunity( + @Path("creatorId") creatorId: Long, + @Query("page") page: Int, + @Query("size") size: Int, + @Header("Authorization") authHeader: String + ): Single> } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelRepository.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelRepository.kt index bca71aec..eb469291 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelRepository.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/data/CreatorChannelRepository.kt @@ -66,6 +66,18 @@ class CreatorChannelRepository( authHeader = token ) + fun getCommunity( + creatorId: Long, + page: Int, + size: Int, + token: String + ) = api.getCommunity( + creatorId = creatorId, + page = page, + size = size, + authHeader = token + ) + fun followCreator( creatorId: Long, follow: Boolean,