本文整理了Java中retrofit2.http.Query.<init>
方法的一些代码示例,展示了Query.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.<init>
方法的具体详情如下:
包路径:retrofit2.http.Query
类名称:Query
方法名:<init>
暂无
代码示例来源:origin: smuyyh/BookReader
/**
* 获取书评区、书荒区帖子详情内的评论列表
*
* @param bookReviewId->_id
* @param start 0
* @param limit 30
* @return
*/
@GET("/post/review/{bookReviewId}/comment")
Observable<CommentList> getBookReviewComments(@Path("bookReviewId") String bookReviewId, @Query("start") String start, @Query("limit") String limit);
代码示例来源:origin: iMeiji/Toutiao
/**
* 获取新闻标题等信息 部分请求参数不同上
* "http://toutiao.com/api/article/recent/?source=2&category=类型&as=A105177907376A5&cp=5797C7865AD54E1&_=时间&count=30";
*/
@GET("api/article/recent/?source=2&as=A1F519007D6B4BB&cp=590D4B541BBB1E1")
@Headers({
"User-Agent:" + Constant.USER_AGENT_PC,
"X-Requested-With:XMLHttpRequest"
})
Call<ResponseBody> getNewsArticle2(
@Query("category") String category,
@Query("_") int max_behot_time);
代码示例来源:origin: allure-framework/allure2
@PUT("raven/1.0/api/testrun/{id}/status")
Response<ResponseBody> updateTestRunStatus(@Path("id") Integer id, @Query("status") String status);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources list" })
@GET("subscriptions/{subscriptionId}/resources")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$expand") String expand, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-storage
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts checkNameAvailability" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability")
Observable<Response<ResponseBody>> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountCheckNameAvailabilityParameters accountName, @Header("User-Agent") String userAgent);
代码示例来源:origin: ribot/ribot-app-android
@GET("ribots")
Observable<List<Ribot>> getRibots(@Header(AUTH_HEADER) String authorization,
@Query("embed") String embed);
代码示例来源:origin: chaychan/TouTiao
@Headers({
"Content-Type:application/x-www-form-urlencoded; charset=UTF-8",
"Cookie:PHPSESSIID=334267171504; _ga=GA1.2.646236375.1499951727; _gid=GA1.2.951962968.1507171739; Hm_lvt_e0a6a4397bcb500e807c5228d70253c8=1507174305;Hm_lpvt_e0a6a4397bcb500e807c5228d70253c8=1507174305; _gat=1",
"Origin:http://toutiao.iiilab.com"
})
@POST("https://www.parsevideo.com/api.php")
Observable<VideoPathResponse> parseVideo(@Query("url") String url,@Query("hash")String hash);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources")
Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$expand") String expand, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-storage
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts listServiceSAS" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas")
Observable<Response<ResponseBody>> listServiceSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body ServiceSasParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: smuyyh/BookReader
/**
* 获取综合讨论区帖子详情内的评论列表
*
* @param disscussionId->_id
* @param start 0
* @param limit 30
* @return
*/
@GET("/post/{disscussionId}/comment")
Observable<CommentList> getBookDisscussionComments(@Path("disscussionId") String disscussionId, @Query("start") String start, @Query("limit") String limit);
代码示例来源:origin: Rukey7/MvpApp
/**
* 获取美女图片,这个API不完整,省略了好多参数
* eg: http://c.3g.163.com/recommend/getChanListNews?channel=T1456112189138&size=20&offset=0
*
* @param offset 起始页码
* @return
*/
@Headers(CACHE_CONTROL_NETWORK)
@GET("recommend/getChanListNews?channel=T1456112189138&size=20")
Observable<Map<String, List<BeautyPhotoInfo>>> getBeautyPhoto(@Query("offset") int offset);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Providers list" })
@GET("subscriptions/{subscriptionId}/providers")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("$top") Integer top, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-storage
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts regenerateKey" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey")
Observable<Response<ResponseBody>> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountRegenerateKeyParameters regenerateKey, @Header("User-Agent") String userAgent);
代码示例来源:origin: HotBitmapGG/bilibili-android-client
/**
* b站高清视频
* quailty:清晰度(1~2,根据视频有不同)
* type: 格式(mp4/flv)
*/
@GET("/video/{cid}")
Observable<HDVideoInfo> getHDVideoUrl(@Path("cid") int cid, @Query("quailty") int quailty, @Query("type") String type);
代码示例来源:origin: hidroh/materialistic
@Headers({RestServiceFactory.CACHE_CONTROL_MAX_AGE_24H,
X_API_KEY + BuildConfig.MERCURY_TOKEN})
@GET("parser")
Observable<Readable> parse(@Query("url") String url);
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicyAssignments list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers verifyIPFlow" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify")
Observable<Response<ResponseBody>> verifyIPFlow(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body VerificationIPFlowParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
代码示例来源:origin: smuyyh/BookReader
@GET("/mix-atoc/{bookId}")
Observable<BookMixAToc> getBookMixAToc(@Path("bookId") String bookId, @Query("view") String view);
代码示例来源:origin: JessYanCoding/RetrofitUrlManager
/**
* 如果不需要多个 BaseUrl, 继续使用初始化时传入 Retrofit 中的默认 BaseUrl, 就不要加上 DOMAIN_NAME_HEADER 这个 Header
*/
@Headers({DOMAIN_NAME_HEADER + GITHUB_DOMAIN_NAME})
/**
* 可以通过在注解里给全路径达到使用不同的 BaseUrl, 但是这样无法在 App 运行时动态切换 BaseUrl
*/
@GET("/users")
Observable<ResponseBody> getUsers(@Query("since") int lastIdQueried, @Query("per_page") int perPage);
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancers getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
内容来源于网络,如有侵权,请联系作者删除!