本文整理汇总了Java中retrofit2.http.Query类的典型用法代码示例。如果您正苦于以下问题:Java Query类的具体用法?Java Query怎么用?Java Query使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于retrofit2.http包,在下文中一共展示了Query类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGoldList
import retrofit2.http.Query; //导入依赖的package包/类
/**
* 文章列表
*/
@GET("1.1/classes/Entry")
Flowable<GoldHttpResponse<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);
示例2: getMovieDetail
import retrofit2.http.Query; //导入依赖的package包/类
/**
* 获取电影详情
*
* @param id 电影bean里的id
*/
@GET("subject/{id}")
Observable<MovieDetailBean> getMovieDetail(@Path("id") String id,
@Query("apikey") String apikey,
@Query("city") String city,
@Query("client") String client,
@Query("udid") String udid);
示例3: getBookSeries
import retrofit2.http.Query; //导入依赖的package包/类
@GET("book/series/{seriesId}/books")
Observable<Response<BookSeriesListResponse>>
getBookSeries(
@Path("seriesId") String seriesId
, @Query("start") int start
, @Query("count") int count
, @Query("fields") String fields);
示例4: getUserPublicRepos
import retrofit2.http.Query; //导入依赖的package包/类
/**
* List user repositories
*/
@NonNull @GET("users/{user}/repos")
Observable<retrofit2.Response<ArrayList<Repository>>> getUserPublicRepos(
@Header("forceNetWork") boolean forceNetWork,
@Path("user") @NonNull String user,
@Query("page") int page,
@Query("type") String type,
@Query("sort") String sort,
@Query("direction") String direction
);
示例5: getTrackLocationSongId
import retrofit2.http.Query; //导入依赖的package包/类
@GET("music/{provider}?net=mob&pt=e")
Call<Void> getTrackLocationSongId(@Header("X-Device-ID") String androidID,
@Path("provider") Provider provider,
@Query("opt") StreamQuality quality,
@Query("slt") String salt,
@Query("sig") String signature,
@Query("songid") String trackID,
@QueryMap Map<String, String> kwargs);
示例6: getWithQueryParam
import retrofit2.http.Query; //导入依赖的package包/类
@Test public void getWithQueryParam() {
class Example {
@GET("/foo/bar/") //
Call<ResponseBody> method(@Query("ping") String ping) {
return null;
}
}
Request request = buildRequest(Example.class, "pong");
assertThat(request.method()).isEqualTo("GET");
assertThat(request.headers().size()).isZero();
assertThat(request.url().toString()).isEqualTo("http://example.com/foo/bar/?ping=pong");
assertThat(request.body()).isNull();
}
示例7: getRssFeed
import retrofit2.http.Query; //导入依赖的package包/类
@GET("videos")
Call<Result<Video>> getRssFeed(@Query("order") String order,
@Query("limit") int limit,
@Query("page") int page,
@Query("expand") String expand,
@Query("search") String search,
@Query("filter") String filter,
@Query("format") String format);
示例8: move
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.WebSiteManagementClient move" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources")
Observable<Response<ResponseBody>> move(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelopeInner moveResourceEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例9: rebootWorker
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.AppServicePlans rebootWorker" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot")
Observable<Response<ResponseBody>> rebootWorker(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerName") String workerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例10: searchUsers
import retrofit2.http.Query; //导入依赖的package包/类
@GET("search/users")
Single<Pageable<User>> searchUsers(@Query(value = "q", encoded = true) String query, @Query("page") long page);
示例11: list
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.RecommendedElasticPools list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例12: getAuthorizationRule
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces getAuthorizationRule" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
Observable<Response<ResponseBody>> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例13: delete
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkSecurityGroups delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
示例14: setDefaultAddress
import retrofit2.http.Query; //导入依赖的package包/类
@Headers({HEADER_API_VERSION})
@PUT("customer/address/setDefault")
Observable<BaseJson<String>> setDefaultAddress(@Query("id") int id);
示例15: getMoviesBySortType
import retrofit2.http.Query; //导入依赖的package包/类
@GET("movie/{sort}")
Observable<QueryMoviesResponse<MovieEntity>> getMoviesBySortType(@Path("sort") String sort, @Query("page") Integer page);