ArticleApi.kt 1.12 KB
Newer Older
范玉宾 committed
1 2 3 4 5
package http

import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
6
import data.ArticleCategoryListBean
范玉宾 committed
7 8 9 10 11 12 13 14
import data.ArticleListBean
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.Query

interface ArticleApi {

15 16 17 18 19
    //文章标签
    @GET("newArticle/ArticleCate")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getArticleTagList(): Observable<BaseAPIResponse<ArticleCategoryListBean>>

范玉宾 committed
20
    //文章列表
21
    @GET("newArticle/list/all")
范玉宾 committed
22 23
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getArticleList(
24
        @Query("perPageRows") perPageRows: Int = 10,
范玉宾 committed
25 26 27 28
        @Query("page") page: Int = 1,
        @Query("tagId") tagId: Int = 0
    ): Observable<BaseAPIResponse<ArticleListBean>>

29
    //文章列表  推荐列表
范玉宾 committed
30
    @GET("newArticle/list/recommend")
31 32 33 34 35 36
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getRecommendArticleList(
        @Query("perPageRows") perPageRows: Int = 10,
        @Query("page") page: Int = 1
    ): Observable<BaseAPIResponse<ArticleListBean>>

范玉宾 committed
37
}