下面列出了retrofit2.http.GET#retrofit2.http.Query 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 获取文章列表
*/
@GET("article/list")
Observable<RespData<ArticleResp>> getArticleListInfo(@Query("parent_id") int topId,
@Query("category_id") int subId,
@Query("type") int type,
@Query("start") long startIndex,
@Query("size") int pageSize);
/**
* 文章列表
*/
@Headers({DOMAIN_NAME_HEADER + GOLD_DOMAIN_NAME})
@GET("/1.1/classes/Entry")
Observable<GoldBaseResponse<List<GoldListBean>>> getGoldList(@Header("X-LC-Id") String id,
@Header("X-LC-Sign") String sign,
@Query("where") String where,
@Query("order") String order,
@Query("include") String include,
@Query("limit") int limit,
@Query("skip") int skip);
@GET("api/v1/withdrawals")
Call<KucoinResponse<Pagination<WithdrawResponse>>> getWithdrawPageList(@Query("currentPage") int currentPage,
@Query("pageSize") int pageSize,
@Query("currency") String currency,
@Query("status") String status,
@Query("startAt") Long startAt,
@Query("endAt") Long endAt);
@GET("api/v1/deposits")
Call<KucoinResponse<Pagination<DepositResponse>>> getDepositPageList(@Query("currentPage") int currentPage,
@Query("pageSize") int pageSize,
@Query("currency") String currency,
@Query("status") String status,
@Query("startAt") Long startAt,
@Query("endAt") Long endAt);
@GET("api/v1/orders")
Call<KucoinResponse<Pagination<OrderResponse>>> queryOrders(@Query("symbol") String symbol,
@Query("side") String side,
@Query("type") String type,
@Query("status") String status,
@Query("startAt") Long startAt,
@Query("endAt") Long endAt,
@Query("pageSize") int pageSize,
@Query("currentPage") int currentPage);
@GET("news/item")
Call<ResponseBody> getNBANews(@Query("column") String column,
@Query("articleIds") String articleIds);
/**
* 获取公告
*/
@GET("article/announcements")
Single<RespData<AdResp>> getAdvertisement(@Query("start") int start,
@Query("size") int size,
@Query("position") int position);
@GET("v1/user/detail?filter=for_android")
Observable<UserDetailResponse> getUserDetail(@Header("Authorization") String token,
@Query("user_id") int user_id);
@GET("v1/search/illust?search_target=partial_match_for_tags&sort=date_desc&filter=for_ios")
Call<Illusts> getTagSearchJson(@Query("word") String tag);
@GET("simple/token_price/{id}")
Call<Map<String,Map<String, Double>>> getTokenPrice(@Path("id") String id, @Query("contract_addresses") String contractAddress,
@Query("vs_currencies") String vsCurrencies, @Query("include_market_cap") boolean includeMarketCap,
@Query("include_24hr_vol") boolean include24hrVol, @Query("include_24hr_change") boolean include24hrChange,
@Query("include_last_updated_at") boolean includeLastUpdatedAt);
@GET("coins/{id}/tickers")
Call<CoinTickerById> getCoinTickerById(@Path("id") String id, @Query("exchange_ids") String exchangeIds,
@Query("page") Integer page,@Query("order") String order);
@GET("coins/{id}/market_chart")
Call<MarketChart> getCoinMarketChartById(@Path("id") String id, @Query("vs_currency") String vsCurrency,
@Query("days") Integer days);
@GET("coins/{id}/market_chart/range")
Call<MarketChart> getCoinMarketChartRangeById(@Path("id") String id, @Query("vs_currency") String vsCurrency,
@Query("from") String from, @Query("to") String to);
@GET("v1/user/illusts?filter=for_ios")
Call<Illusts> getArtistJson(@Query("user_id") String artist_id);
@GET("exchanges/{id}/tickers")
Call<ExchangesTickersById> getExchangesTickersById(@Path("id") String id, @Query("coin_ids") String coinIds,
@Query("page") Integer page, @Query("order") String order);
@GET("exchanges/{id}/status_updates")
Call<StatusUpdates> getExchangesStatusUpdatesById(@Path("id") String id, @Query("per_page")Integer perPage,
@Query("page") Integer page);
@GET("status_updates")
Call<StatusUpdates> getStatusUpdates(@Query("category") String category, @Query("project_type") String projectType,
@Query("per_page") Integer perPage, @Query("page") Integer page);
/**
* 获取标签
*/
@GET("article/label")
Single<RespData<LabelResp>> getLabel(@Query("start") int start,
@Query("size") int size,
@Query("name") String name);
@GET("weblist")
Call<List<Website>> getWebsiteListByCategory(@Query("name") String name);
@GET("v1/novel/text")
Observable<NovelDetail> getNovelDetail(@Header("Authorization") String token,
@Query("novel_id") int novel_id);
@GET("feedRequireList")
Call<List<FeedRequire>> getFeedRequireListByWebsite(@Query("id") String id);
/**
* 获取通知列表
*/
@GET("notify/notifications")
Single<RespData<NotifyInfoResp>> getNotificationList(@Query("size") int size,
@Query("start") int start);
/**
* 获取禁止评论列表用户驳回原因
*/
@GET("account/comment_blacklist")
Single<RespData<ForbidCommentResp>> getForbidComment(@Query("start") int start,
@Query("size") int size,
@Query("account") String account);
@GET("v1/illust/bookmark/users?filter=for_android")
Observable<ListSimpleUser> getUsersWhoLikeThisIllust(@Header("Authorization") String token,
@Query("illust_id") int illust_id);
@GET("project/list/{pageNum}/json")
Observable<ArticleDataRes> getProectTreeDetailArticleData(@Path("pageNum") int pageNum, @Query("cid") int cid);
@GET("wxarticle/list/{cid}/{pageNum}/json")
Observable<ArticleDataRes> searchWechatChapterArticles(@Path("cid") int cid, @Path("pageNum") int pageNum, @Query("k") String keywords);
/**
* 获取金币订单
*/
@GET("account/coin_order")
Single<RespData<CoinOrderResp>> getCoinOrder(@Query("status") int status,
@Query("start") int start,
@Query("size") int size);
@GET("api/v1/market/histories")
Call<KucoinResponse<List<TradeHistoryResponse>>> getTradeHistories(@Query("symbol") String symbol);
@GET("api/v1/market/candles")
Call<KucoinResponse<List<List<String>>>> getHistoricRates(@Query("symbol") String symbol,
@Query("startAt") long startAt,
@Query("endAt") long endAt,
@Query("type") String type);
@GET("api/v1/market/orderbook/level2_100")
Call<KucoinResponse<OrderBookResponse>> getPartOrderBookAggregated(@Query("symbol") String symbol);