Java Code Examples for retrofit2.http.Path

The following are top voted examples for showing how to use retrofit2.http.Path. 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: RequestBuilderTest.java   View source code 5 votes vote down vote up
@Test public void getWithUnusedAndInvalidNamedPathParam() {
  class Example {
    @GET("/foo/bar/{ping}/{kit,kat}/") //
    Call<ResponseBody> method(@Path("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/pong/%7Bkit,kat%7D/");
  assertThat(request.body()).isNull();
}
 
Example 2
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 getMSDeployStatus" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy")
Observable<Response<ResponseBody>> getMSDeployStatus(@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 3
Project: azure-libraries-for-java   File: AccountsImpl.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.datalake.analytics.Accounts create" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}")
Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body DataLakeAnalyticsAccount parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 4
Project: autorest.java   File: PagingsImpl.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.paging.Pagings getMultiplePagesWithOffset" })
@GET("paging/multiple/withpath/{offset}")
Observable<Response<ResponseBody>> getMultiplePagesWithOffset(@Path("offset") int offset, @Header("client-request-id") String clientRequestId, @Header("accept-language") String acceptLanguage, @Header("maxresults") Integer maxresults, @Header("timeout") Integer timeout, @Header("User-Agent") String userAgent);
 
Example 5
Project: jira-steps   File: JiraEndPoints.java   View source code 4 votes vote down vote up
@PUT("rest/api/2/component/{id}")
Call<Void> updateComponent(@Path("id") int id, @Body Component component);
 
Example 6
Project: mvvm-template   File: RepoService.java   View source code 4 votes vote down vote up
@NonNull @GET("repos/{owner}/{repo}/tags")
Single<Pageable<BranchesModel>> getTags(@NonNull @Path("owner") String owner, @NonNull @Path("repo") String repo,
                                            @Query("page") int page);
 
Example 7
Project: azure-libraries-for-java   File: LoadBalancerBackendAddressPoolsInner.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.LoadBalancerBackendAddressPools get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("backendAddressPoolName") String backendAddressPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 8
Project: QNewsDemo   File: QNewsService.java   View source code 4 votes vote down vote up
@GET("福利/count/{count}/page/{page}")
Observable<ImageBean> getImgs(@Path("count") int count, @Path("page") int page);
 
Example 9
Project: azure-libraries-for-java   File: VirtualNetworksInner.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.VirtualNetworks listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks")
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 10
Project: azure-libraries-for-java   File: JobsInner.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.Jobs run" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run")
Observable<Response<ResponseBody>> run(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobCollectionName") String jobCollectionName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 11
Project: autorest.java   File: PathsImpl.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.url.Paths dateTimeValid" })
@GET("paths/datetime/2012-01-01T01%3A01%3A01Z/{dateTimePath}")
Observable<Response<ResponseBody>> dateTimeValid(@Path("dateTimePath") DateTime dateTimePath);
 
Example 12
Project: pipe   File: RemoteService.java   View source code 4 votes vote down vote up
@GET("user/search/{name}")
Call<RspModel<List<UserCard>>> userSearch(@Path("name") String name);
 
Example 13
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 getDatabases" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}")
Observable<Response<ResponseBody>> getDatabases(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("recommendedElasticPoolName") String recommendedElasticPoolName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 14
Project: GHCli   File: IGitHubUser.java   View source code 4 votes vote down vote up
@GET("user/following/{user}")
Call<Void> isFollowing(@Header("Authorization") String credentials, @Path("user") String user);
 
Example 15
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 restore" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore")
Observable<Response<ResponseBody>> restore(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 16
Project: azure-libraries-for-java   File: ImagesInner.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.Images beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageInner parameters, @Query("api-version") String apiVersion, @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: DiscogsBrowser   File: DiscogsService.java   View source code 4 votes vote down vote up
@DELETE("/users/{username}/wants/{release_id}")
Single<Response<Void>> removeFromWantlist(@Path("username") String username, @Path("release_id") String releaseId);
 
Example 19
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 beginUpdateInstances" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade")
Observable<Response<ResponseBody>> beginUpdateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent);
 
Example 20
Project: azure-libraries-for-java   File: RoleAssignmentsInner.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.graphrbac.RoleAssignments deleteById" })
@HTTP(path = "{roleAssignmentId}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> deleteById(@Path(value = "roleAssignmentId", encoded = true) String roleAssignmentId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 21
Project: flexibee   File: FlexibeeClient.java   View source code 4 votes vote down vote up
@PUT("/c/{company}/adresar.xml")
Call<WinstromResponse> createAddressBook(@Path("company") String company, @Body WinstromRequest request);
 
Example 22
Project: azure-libraries-for-java   File: ManagementLocksInner.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.locks.ManagementLocks deleteAtSubscriptionLevel" })
@HTTP(path = "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> deleteAtSubscriptionLevel(@Path("lockName") String lockName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 23
Project: autorest.java   File: SkipUrlEncodingsImpl.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.azurespecials.SkipUrlEncodings getMethodPathValid" })
@GET("azurespecials/skipUrlEncoding/method/path/valid/{unencodedPathParam}")
Observable<Response<ResponseBody>> getMethodPathValid(@Path(value = "unencodedPathParam", encoded = true) String unencodedPathParam, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 24
Project: azure-libraries-for-java   File: VaultExtendedInfosInner.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.recoveryservices.VaultExtendedInfos update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo")
Observable<Response<ResponseBody>> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Body VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 25
Project: PopCorn   File: ApiInterface.java   View source code 4 votes vote down vote up
@GET("tv/{id}/credits")
Call<TVShowCreditsResponse> getTVShowCredits(@Path("id") Integer movieId, @Query("api_key") String apiKey);
 
Example 26
Project: azure-libraries-for-java   File: PacketCapturesInner.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.PacketCaptures getStatus" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus")
Observable<Response<ResponseBody>> getStatus(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("packetCaptureName") String packetCaptureName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 27
Project: azure-libraries-for-java   File: CustomImagesInner.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.CustomImages list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("labName") String labName, @Query("$expand") String expand, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 28
Project: Hillffair17   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 29
Project: CXJPadProject   File: BService.java   View source code 4 votes vote down vote up
@GET("/pad/order/findOrderSettlementDetail/{orderId}")
Call<RMResponse<BalanceListResponseModel>> findOrderSettlementDetail(@Path("orderId") String orderId);
 
Example 30
Project: autorest.java   File: PathsImpl.java   View source code 4 votes vote down vote up
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: fixtures.url.Paths enumNull" })
@GET("paths/string/null/{enumPath}")
Observable<Response<ResponseBody>> enumNull(@Path("enumPath") UriColor enumPath);
 
Example 31
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 update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 32
Project: azure-libraries-for-java   File: AccountsImpl.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.datalake.store.Accounts beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@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 33
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 list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces")
Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 34
Project: BookReader-master   File: BookApiService.java   View source code 4 votes vote down vote up
@GET("/book/{bookId}")
Observable<BookDetail> getBookDetail(@Path("bookId") String bookId);
 
Example 35
Project: civify-app   File: IssueService.java   View source code 4 votes vote down vote up
@POST("/issues/{issue_auth_token}/report")
Call<MessageResponse> issueReport(@Header("Authorization") String authToken,
        @Body JsonObject userToken, @Path("issue_auth_token") String issueAuthToken);
 
Example 36
Project: Protein   File: UserService.java   View source code 4 votes vote down vote up
@DELETE("/v1/users/{user_id}/follow")
Observable<Response<Body>> unfollow(@Path("user_id") long userId);
 
Example 37
Project: azure-libraries-for-java   File: ActivityLogsInner.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.ActivityLogs list" })
@GET("subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Query("$select") String select, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
 
Example 38
Project: DiscogsBrowser   File: DiscogsService.java   View source code 4 votes vote down vote up
@GET("artists/{artist_id}/releases")
Single<RootArtistReleaseResponse> getArtistReleases(@Path("artist_id") String artistId, @Query("sort_order") String sort, @Query("per_page") String perPage);
 
Example 39
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 listConfigurations" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config")
Observable<Response<ResponseBody>> listConfigurations(@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 40
Project: azure-libraries-for-java   File: ComputePoliciesImpl.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.datalake.analytics.ComputePolicies update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("computePolicyName") String computePolicyName, @Path("subscriptionId") String subscriptionId, @Body ComputePolicy parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);