feat(creator-channel): 커뮤니티 상세 조회 계약을 추가한다
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package kr.co.vividnext.sodalive.v2.creator.channel.community.detail.data
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelCommunityPostDetailResponse(
|
||||
@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("isLiked") val isLiked: Boolean,
|
||||
@SerializedName("isPinned") val isPinned: Boolean,
|
||||
@SerializedName("comments") val comments: CreatorChannelCommunityCommentsResponse
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelCommunityCommentsResponse(
|
||||
@SerializedName("commentCount") val commentCount: Int,
|
||||
@SerializedName("comments") val comments: List<CreatorChannelCommunityCommentResponse>,
|
||||
@SerializedName("page") val page: Int,
|
||||
@SerializedName("size") val size: Int,
|
||||
@SerializedName("hasNext") val hasNext: Boolean
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelCommunityCommentResponse(
|
||||
@SerializedName("commentId") val commentId: Long,
|
||||
@SerializedName("writerId") val writerId: Long,
|
||||
@SerializedName("writerProfileImageUrl") val writerProfileImageUrl: String,
|
||||
@SerializedName("writerNickname") val writerNickname: String,
|
||||
@SerializedName("content") val content: String,
|
||||
@SerializedName("isSecret") val isSecret: Boolean,
|
||||
@SerializedName("createdAtUtc") val createdAtUtc: String,
|
||||
@SerializedName("latestReply") val latestReply: CreatorChannelCommunityReplyResponse?
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelCommunityReplyResponse(
|
||||
@SerializedName("commentId") val commentId: Long,
|
||||
@SerializedName("writerId") val writerId: Long,
|
||||
@SerializedName("writerProfileImageUrl") val writerProfileImageUrl: String,
|
||||
@SerializedName("writerNickname") val writerNickname: String,
|
||||
@SerializedName("content") val content: String,
|
||||
@SerializedName("createdAtUtc") val createdAtUtc: String
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CreatorChannelCommunityRepliesResponse(
|
||||
@SerializedName("replies") val replies: List<CreatorChannelCommunityReplyResponse>,
|
||||
@SerializedName("page") val page: Int,
|
||||
@SerializedName("size") val size: Int,
|
||||
@SerializedName("hasNext") val hasNext: Boolean
|
||||
)
|
||||
@@ -5,6 +5,9 @@ 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.community.detail.data.CreatorChannelCommunityCommentsResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.data.CreatorChannelCommunityPostDetailResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.data.CreatorChannelCommunityRepliesResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.donation.data.CreatorChannelDonationTabResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.fantalk.data.CreatorChannelFanTalkTabResponse
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.data.CreatorChannelLiveTabResponse
|
||||
@@ -57,6 +60,28 @@ interface CreatorChannelApi {
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelCommunityTabResponse>>
|
||||
|
||||
@GET("/api/v2/creator-channels/community-posts/{postId}")
|
||||
fun getCommunityPostDetail(
|
||||
@Path("postId") postId: Long,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelCommunityPostDetailResponse>>
|
||||
|
||||
@GET("/api/v2/creator-channels/community-posts/{postId}/comments")
|
||||
fun getCommunityPostComments(
|
||||
@Path("postId") postId: Long,
|
||||
@Query("page") page: Int,
|
||||
@Query("size") size: Int,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelCommunityCommentsResponse>>
|
||||
|
||||
@GET("/api/v2/creator-channels/community-comments/{commentId}/replies")
|
||||
fun getCommunityCommentReplies(
|
||||
@Path("commentId") commentId: Long,
|
||||
@Query("page") page: Int,
|
||||
@Query("size") size: Int,
|
||||
@Header("Authorization") authHeader: String
|
||||
): Single<ApiResponse<CreatorChannelCommunityRepliesResponse>>
|
||||
|
||||
@GET("/api/v2/creator-channels/{creatorId}/fan-talks")
|
||||
fun getFanTalks(
|
||||
@Path("creatorId") creatorId: Long,
|
||||
|
||||
@@ -79,6 +79,35 @@ class CreatorChannelRepository(
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun getCommunityPostDetail(postId: Long, token: String) = api.getCommunityPostDetail(
|
||||
postId = postId,
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun getCommunityPostComments(
|
||||
postId: Long,
|
||||
page: Int = 0,
|
||||
size: Int = 20,
|
||||
token: String
|
||||
) = api.getCommunityPostComments(
|
||||
postId = postId,
|
||||
page = page,
|
||||
size = size,
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun getCommunityCommentReplies(
|
||||
commentId: Long,
|
||||
page: Int = 0,
|
||||
size: Int = 20,
|
||||
token: String
|
||||
) = api.getCommunityCommentReplies(
|
||||
commentId = commentId,
|
||||
page = page,
|
||||
size = size,
|
||||
authHeader = token
|
||||
)
|
||||
|
||||
fun getFanTalks(
|
||||
creatorId: Long,
|
||||
page: Int,
|
||||
|
||||
Reference in New Issue
Block a user