feat(creator): 커뮤니티 탭 API 계약을 추가한다
This commit is contained in:
@@ -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<CreatorChannelCommunityPostResponse>,
|
||||
@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
|
||||
)
|
||||
@@ -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<ApiResponse<CreatorChannelSeriesTabResponse>>
|
||||
|
||||
@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<ApiResponse<CreatorChannelCommunityTabResponse>>
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user