feat(home): 익명 추천 조회와 서브 배너 응답을 추가한다
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ import retrofit2.http.POST
|
|||||||
interface HomeRecommendationApi {
|
interface HomeRecommendationApi {
|
||||||
@GET("/api/v2/home/recommendations")
|
@GET("/api/v2/home/recommendations")
|
||||||
fun getRecommendations(
|
fun getRecommendations(
|
||||||
@Header("Authorization") authHeader: String
|
@Header("Authorization") authHeader: String?
|
||||||
): Single<ApiResponse<HomeRecommendationResponse>>
|
): Single<ApiResponse<HomeRecommendationResponse>>
|
||||||
|
|
||||||
@POST("/api/v2/home/recommendations/creators/follow")
|
@POST("/api/v2/home/recommendations/creators/follow")
|
||||||
|
|||||||
+3
-1
@@ -3,6 +3,7 @@ package kr.co.vividnext.sodalive.v2.main.home.data
|
|||||||
import androidx.annotation.Keep
|
import androidx.annotation.Keep
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import kr.co.vividnext.sodalive.settings.event.EventItem
|
import kr.co.vividnext.sodalive.settings.event.EventItem
|
||||||
|
import kr.co.vividnext.sodalive.v2.widget.subbanner.SubBannerResponse
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
data class HomeRecommendationResponse(
|
data class HomeRecommendationResponse(
|
||||||
@@ -13,7 +14,8 @@ data class HomeRecommendationResponse(
|
|||||||
@SerializedName("aiCharacters") val aiCharacters: List<HomeAiCharacterItem>,
|
@SerializedName("aiCharacters") val aiCharacters: List<HomeAiCharacterItem>,
|
||||||
@SerializedName("genreCreators") val genreCreators: List<HomeGenreCreatorGroupItem>,
|
@SerializedName("genreCreators") val genreCreators: List<HomeGenreCreatorGroupItem>,
|
||||||
@SerializedName("cheerCreators") val cheerCreators: List<HomeCreatorItem>,
|
@SerializedName("cheerCreators") val cheerCreators: List<HomeCreatorItem>,
|
||||||
@SerializedName("popularCommunityPosts") val popularCommunityPosts: List<HomePopularCommunityPostItem>
|
@SerializedName("popularCommunityPosts") val popularCommunityPosts: List<HomePopularCommunityPostItem>,
|
||||||
|
@SerializedName("subBanners") val subBanners: List<SubBannerResponse?>? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
package kr.co.vividnext.sodalive.v2.main.home.data
|
package kr.co.vividnext.sodalive.v2.main.home.data
|
||||||
|
|
||||||
class HomeRecommendationRepository(private val api: HomeRecommendationApi) {
|
class HomeRecommendationRepository(private val api: HomeRecommendationApi) {
|
||||||
fun getRecommendations(token: String) = api.getRecommendations(authHeader = token)
|
fun getRecommendations(token: String?) = api.getRecommendations(authHeader = token?.takeIf { it.isNotBlank() })
|
||||||
|
|
||||||
fun followRecommendedCreators(
|
fun followRecommendedCreators(
|
||||||
request: FollowRecommendedCreatorsRequest,
|
request: FollowRecommendedCreatorsRequest,
|
||||||
|
|||||||
Reference in New Issue
Block a user