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