feat(creator): 후원 탭 API 계약을 추가한다
This commit is contained in:
@@ -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.common.data.ContentSort
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.audio.data.CreatorChannelAudioTabResponse
|
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.data.CreatorChannelCommunityTabResponse
|
||||||
|
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.fantalk.data.CreatorChannelFanTalkTabResponse
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.data.CreatorChannelLiveTabResponse
|
import kr.co.vividnext.sodalive.v2.creator.channel.live.data.CreatorChannelLiveTabResponse
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.series.data.CreatorChannelSeriesTabResponse
|
import kr.co.vividnext.sodalive.v2.creator.channel.series.data.CreatorChannelSeriesTabResponse
|
||||||
@@ -63,4 +64,12 @@ interface CreatorChannelApi {
|
|||||||
@Query("size") size: Int,
|
@Query("size") size: Int,
|
||||||
@Header("Authorization") authHeader: String
|
@Header("Authorization") authHeader: String
|
||||||
): Single<ApiResponse<CreatorChannelFanTalkTabResponse>>
|
): Single<ApiResponse<CreatorChannelFanTalkTabResponse>>
|
||||||
|
|
||||||
|
@GET("/api/v2/creator-channels/{creatorId}/donations")
|
||||||
|
fun getDonations(
|
||||||
|
@Path("creatorId") creatorId: Long,
|
||||||
|
@Query("page") page: Int,
|
||||||
|
@Query("size") size: Int,
|
||||||
|
@Header("Authorization") authHeader: String
|
||||||
|
): Single<ApiResponse<CreatorChannelDonationTabResponse>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,18 @@ class CreatorChannelRepository(
|
|||||||
authHeader = token
|
authHeader = token
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun getDonations(
|
||||||
|
creatorId: Long,
|
||||||
|
page: Int,
|
||||||
|
size: Int,
|
||||||
|
token: String
|
||||||
|
) = api.getDonations(
|
||||||
|
creatorId = creatorId,
|
||||||
|
page = page,
|
||||||
|
size = size,
|
||||||
|
authHeader = token
|
||||||
|
)
|
||||||
|
|
||||||
fun followCreator(
|
fun followCreator(
|
||||||
creatorId: Long,
|
creatorId: Long,
|
||||||
follow: Boolean,
|
follow: Boolean,
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package kr.co.vividnext.sodalive.v2.creator.channel.donation.data
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class CreatorChannelDonationTabResponse(
|
||||||
|
@SerializedName("donationCount") val donationCount: Int,
|
||||||
|
@SerializedName("rankings") val rankings: List<MemberDonationRankingResponse>,
|
||||||
|
@SerializedName("donations") val donations: List<CreatorChannelDonationResponse>,
|
||||||
|
@SerializedName("page") val page: Int,
|
||||||
|
@SerializedName("size") val size: Int,
|
||||||
|
@SerializedName("hasNext") val hasNext: Boolean
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class MemberDonationRankingResponse(
|
||||||
|
@SerializedName("userId") val userId: Long,
|
||||||
|
@SerializedName("nickname") val nickname: String,
|
||||||
|
@SerializedName("profileImage") val profileImage: String,
|
||||||
|
@SerializedName("donationCan") val donationCan: Int
|
||||||
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
|
data class CreatorChannelDonationResponse(
|
||||||
|
@SerializedName("nickname") val nickname: String,
|
||||||
|
@SerializedName("profileImageUrl") val profileImageUrl: String,
|
||||||
|
@SerializedName("can") val can: Int,
|
||||||
|
@SerializedName("message") val message: String,
|
||||||
|
@SerializedName("createdAtUtc") val createdAtUtc: String
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user