From 25320e283d0e249a4cce85ea067795290808ac0a Mon Sep 17 00:00:00 2001 From: klaus Date: Mon, 22 Jun 2026 16:37:53 +0900 Subject: [PATCH] =?UTF-8?q?feat(creator):=20FanTalk=20=ED=83=AD=20API=20?= =?UTF-8?q?=EA=B3=84=EC=95=BD=EC=9D=84=20=EC=B6=94=EA=B0=80=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/channel/data/CreatorChannelApi.kt | 9 +++++ .../channel/data/CreatorChannelRepository.kt | 23 +++++++++++++ .../data/CreatorChannelFanTalkTabResponse.kt | 34 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/fantalk/data/CreatorChannelFanTalkTabResponse.kt 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 453adaf6..48eb2f89 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 @@ -5,6 +5,7 @@ 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.fantalk.data.CreatorChannelFanTalkTabResponse 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 @@ -54,4 +55,12 @@ interface CreatorChannelApi { @Query("size") size: Int, @Header("Authorization") authHeader: String ): Single> + + @GET("/api/v2/creator-channels/{creatorId}/fan-talks") + fun getFanTalks( + @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 eb469291..23332476 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 @@ -4,6 +4,7 @@ import kr.co.vividnext.sodalive.chat.talk.TalkApi import kr.co.vividnext.sodalive.chat.talk.room.CreateChatRoomRequest import kr.co.vividnext.sodalive.explorer.ExplorerRepository import kr.co.vividnext.sodalive.explorer.profile.channel_donation.PostChannelDonationRequest +import kr.co.vividnext.sodalive.explorer.profile.cheers.PutModifyCheersRequest import kr.co.vividnext.sodalive.report.ReportRepository import kr.co.vividnext.sodalive.report.ReportRequest import kr.co.vividnext.sodalive.report.ReportType @@ -78,6 +79,18 @@ class CreatorChannelRepository( authHeader = token ) + fun getFanTalks( + creatorId: Long, + page: Int, + size: Int, + token: String + ) = api.getFanTalks( + creatorId = creatorId, + page = page, + size = size, + authHeader = token + ) + fun followCreator( creatorId: Long, follow: Boolean, @@ -125,4 +138,14 @@ class CreatorChannelRepository( request = ReportRequest(ReportType.PROFILE, reason, reportedMemberId = userId), token = token ) + + fun reportFanTalk(fanTalkId: Long, reason: String, token: String) = reportRepository.report( + request = ReportRequest(ReportType.CHEERS, reason, cheersId = fanTalkId), + token = token + ) + + fun deleteFanTalk(fanTalkId: Long, token: String) = explorerRepository.modifyCheers( + request = PutModifyCheersRequest(cheersId = fanTalkId, isActive = false), + token = token + ) } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/fantalk/data/CreatorChannelFanTalkTabResponse.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/fantalk/data/CreatorChannelFanTalkTabResponse.kt new file mode 100644 index 00000000..cceac0dc --- /dev/null +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/fantalk/data/CreatorChannelFanTalkTabResponse.kt @@ -0,0 +1,34 @@ +package kr.co.vividnext.sodalive.v2.creator.channel.fantalk.data + +import androidx.annotation.Keep +import com.google.gson.annotations.SerializedName + +@Keep +data class CreatorChannelFanTalkTabResponse( + @SerializedName("fanTalkCount") val fanTalkCount: Int, + @SerializedName("fanTalks") val fanTalks: List, + @SerializedName("page") val page: Int, + @SerializedName("size") val size: Int, + @SerializedName("hasNext") val hasNext: Boolean +) + +@Keep +data class CreatorChannelFanTalkResponse( + @SerializedName("fanTalkId") val fanTalkId: Long, + @SerializedName("writerId") val writerId: Long, + @SerializedName("writerNickname") val writerNickname: String, + @SerializedName("writerProfileImageUrl") val writerProfileImageUrl: String, + @SerializedName("content") val content: String, + @SerializedName("createdAtUtc") val createdAtUtc: String, + @SerializedName("creatorReplies") val creatorReplies: List +) + +@Keep +data class CreatorChannelFanTalkReplyResponse( + @SerializedName("fanTalkId") val fanTalkId: Long, + @SerializedName("writerId") val writerId: Long, + @SerializedName("writerNickname") val writerNickname: String, + @SerializedName("writerProfileImageUrl") val writerProfileImageUrl: String, + @SerializedName("content") val content: String, + @SerializedName("createdAtUtc") val createdAtUtc: String +)