Java Code Examples for retrofit2.http.Query

The following are top voted examples for showing how to use retrofit2.http.Query. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: GitHub   File: GoldApis.java   View source code 5 votes vote down vote up
/**
 * 文章列表
 */
@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);
 
Example 2
Project: MyDemo   File: IDouBanApi.java   View source code 5 votes vote down vote up
/**
 * 获取电影详情
 *
 * @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);
 
Example 3
Project: ReadMark   File: IBookSeriesService.java   View source code 5 votes vote down vote up
@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);
 
Example 4
Project: OpenHub   File: RepoService.java   View source code 5 votes vote down vote up
/**
 * 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
);
 
Example 5
Project: gplaymusic   File: GPlayService.java   View source code 5 votes vote down vote up
@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);
 
Example 6
Project: GitHub   File: RequestBuilderTest.java   View source code 5 votes vote down vote up
@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();
}
 
Example 7
Project: anitrend-app   File: Hub.java   View source code 5 votes vote down vote up
@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);
 
Example 8
Project: azure-libraries-for-java   File: WebSiteManagementClientImpl.java   View source code 4 votes vote down vote up
@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);
 
Example 9
Project: azure-libraries-for-java   File: AppServicePlansInner.java   View source code 4 votes vote down vote up
@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);
 
Example 10
Project: mvvm-template   File: SearchService.java   View source code 4 votes vote down vote up
@GET("search/users")
Single<Pageable<User>> searchUsers(@Query(value = "q", encoded = true) String query, @Query("page") long page);
 
Example 11
Project: azure-libraries-for-java   File: RecommendedElasticPoolsInner.java   View source code 4 votes vote down vote up
@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);
 
Example 12
Project: azure-libraries-for-java   File: NamespacesInner.java   View source code 4 votes vote down vote up
@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);
 
Example 13
Project: azure-libraries-for-java   File: NetworkSecurityGroupsInner.java   View source code 4 votes vote down vote up
@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);
 
Example 14
Project: yyox   File: AddressService.java   View source code 4 votes vote down vote up
@Headers({HEADER_API_VERSION})
@PUT("customer/address/setDefault")
Observable<BaseJson<String>> setDefaultAddress(@Query("id") int id);
 
Example 15
Project: mdb-android-application   File: MoviesService.java   View source code 4 votes vote down vote up
@GET("movie/{sort}")
Observable<QueryMoviesResponse<MovieEntity>> getMoviesBySortType(@Path("sort") String sort, @Query("page") Integer page);
 
Example 16
Project: azure-libraries-for-java   File: MapsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Maps listByIntegrationAccounts" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps")
Observable<Response<ResponseBody>> listByIntegrationAccounts(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 17
Project: azure-libraries-for-java   File: SchedulesInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.Schedules get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}")
Observable<Response<ResponseBody>> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Path("name") String name, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 18
Project: Unofficial-Ups   File: UpcServiceInterface.java   View source code 4 votes vote down vote up
@GET("RecursosDisponible/")
Observable<ReserveAvailabilityResponse> getReservesAvailability(@QueryMap Map<String,String> filters,
                                                                @Query("CodAlumno") String userCode,
                                                                @Query("Token") String token);
 
Example 19
Project: TMvpSimple   File: ApiService.java   View source code 4 votes vote down vote up
@GET("top250")
Observable<HttpResult<Subject>> getUser( @Query("touken") String touken);
 
Example 20
Project: azure-libraries-for-java   File: CertificatesInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.Certificates list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 21
Project: azure-libraries-for-java   File: WebAppsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.WebApps isCloneableSlot" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable")
Observable<Response<ResponseBody>> isCloneableSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 22
Project: azure-libraries-for-java   File: ExpressRouteCircuitsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuits beginListArpTable" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}")
Observable<Response<ResponseBody>> beginListArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 23
Project: azure-libraries-for-java   File: AppServiceEnvironmentsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.AppServiceEnvironments listMultiRoleMetricDefinitions" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions")
Observable<Response<ResponseBody>> listMultiRoleMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 24
Project: azure-libraries-for-java   File: PolicyAssignmentsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.PolicyAssignments listForResource" })
@GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments")
Observable<Response<ResponseBody>> listForResource(@Path("resourceGroupName") String resourceGroupName, @Path("resourceProviderNamespace") String resourceProviderNamespace, @Path(value = "parentResourcePath", encoded = true) String parentResourcePath, @Path(value = "resourceType", encoded = true) String resourceType, @Path("resourceName") String resourceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 25
Project: azure-libraries-for-java   File: LogProfilesInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.LogProfiles update" })
@PATCH("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}")
Observable<Response<ResponseBody>> update(@Path("subscriptionId") String subscriptionId, @Path("logProfileName") String logProfileName, @Query("api-version") String apiVersion, @Body LogProfileResourcePatchInner logProfilesResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 26
Project: azure-libraries-for-java   File: WebAppsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.WebApps getSitePhpErrorLogFlagSlot" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging")
Observable<Response<ResponseBody>> getSitePhpErrorLogFlagSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 27
Project: speedr   File: OverpassService.java   View source code 4 votes vote down vote up
@GET("interpreter")
Single<OverpassResponse> getLimit(@Query("data") String data);
 
Example 28
Project: inventum   File: TvService.java   View source code 4 votes vote down vote up
@GET("tv/airing_today")
Call<TVResults> airingToday(
        @Query("api_key") String api_key,
        @Query("language") String lang,
        @Query("page") int page
);
 
Example 29
Project: Guanajoven   File: PromocionesAPI.java   View source code 4 votes vote down vote up
@GET("promociones")
Call<Response<ArrayList<Empresa>>> getEmpresas (
        @Query("timestamp") String timeStamp
);
 
Example 30
Project: presto-rest   File: SlackService.java   View source code 4 votes vote down vote up
@POST("chat.postMessage")
Call<SlackResponse> postMessage(
        @Query("token") String token,
        @Query("channel") String channel,
        @Query("text") String text);
 
Example 31
Project: azure-libraries-for-java   File: JobCollectionsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.scheduler.JobCollections getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 32
Project: azure-libraries-for-java   File: VirtualMachineScaleSetsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets")
Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 33
Project: azure-libraries-for-java   File: ResourceGroupsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups patch" })
@PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}")
Observable<Response<ResponseBody>> patch(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourceGroupInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 34
Project: azure-libraries-for-java   File: GlobalSchedulesInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.devtestlab.GlobalSchedules retarget" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget")
Observable<Response<ResponseBody>> retarget(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Body RetargetSchedulePropertiesInner retargetScheduleProperties, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 35
Project: WatchIt   File: ApiInterface.java   View source code 4 votes vote down vote up
@GET("discover/movie")
Call<MovieResponse> getMoviesByGenre(@Query("api_key") String apiKey, @Query("page") int pageNo, @Query("with_genres") String genres,
                                     @Query("language") String language, @Query("sort_by") String sortBy);
 
Example 36
Project: azure-libraries-for-java   File: DatabasesInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.Databases listTransparentDataEncryptionActivity" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current/operationResults")
Observable<Response<ResponseBody>> listTransparentDataEncryptionActivity(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 37
Project: azure-libraries-for-java   File: StreamingJobsInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.streamanalytics.StreamingJobs list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 38
Project: azure-libraries-for-java   File: ClustersInner.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Clusters list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/clusters")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Query("$filter") String filter, @Query("$select") String select, @Query("maxresults") Integer maxResults, @Header("User-Agent") String userAgent);
 
Example 39
Project: Nimbus   File: ApiInterface.java   View source code 4 votes vote down vote up
@POST("update/rollno/{id}")
Call<RegisterResponse> updateRollNo(@Path("id") String id,@Query("roll_no") String rollNo);
 
Example 40
Project: autorest.java   File: QueriesImpl.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.url.Queries enumValid" })
@GET("queries/enum/green%20color")
Observable<Response<ResponseBody>> enumValid(@Query("enumQuery") UriColor enumQuery);