package com.swago.baseswago.inter

import com.swago.baseswago.model.home.BannerModel
import com.swago.baseswago.model.home.HomeModel
import com.swago.baseswago.model.home.OfficialMsgModel
import com.swago.baseswago.model.home.OfficialSumModel
import retrofit2.http.*

/**
 *@date 2021/11/20 14:16
 *description:
 */
interface HomeApi {

    /**
     * 官方消息汇总接口
     */
    @POST("/v1/user/official/message/detail")
    suspend fun getOfficialSum(): OfficialSumModel

    /**
     * 官方信息列表接口
     */
    @FormUrlEncoded
    @POST("/v1/user/official/message/list")
    suspend fun getOfficialMsg(@Field("page")page:Int, @Field("page_size")page_size:Int=20): OfficialMsgModel


    /**
     * 类型(1热门2新星3关注)
     */
    @FormUrlEncoded
    @POST("/v1/home/user/list")
    suspend fun getHomeList(@Field("type")type:Int, @Field("page")page:Int, @Field("page_size")page_size:Int=500):HomeModel

    /**
     * 轮播图
     */
    @POST("/v1/home/rotation/list")
    suspend fun getHomeBanner():List<BannerModel>

    @FormUrlEncoded
    @POST("/v1/home/search/user/list")
    suspend fun searchForUser(@Field("search_condition")search_condition:String, @Field("page")page:Int, @Field("page_size")page_size:Int=200):HomeModel

}