@GET("/jokes/{id}") Observable<ItemResponse> getItem(@Query("firstName") String firstName, @Query("lastName") String lastName, @Path("id") int id); }
/** * See https://developer.github.com/v3/users/ */ @GET("/users/{user}") Observable<User> user(@Path("user") String user);
/** * See https://developer.github.com/v3/users/ */ @GET("/users/{user}") User getUser(@Path("user") String user); }
@GET("/user_feed/{userId}.json") Call<FeedResponse> userFeed(@Path("userId") long userId, @Query("since") long since);
@Headers("Accept: application/json") @GET("/v1/accounts/{application_key}/query") NewRelicTimeSeries getTimeSeries(@Header("X-Query-Key") String apiKey, @Path("application_key") String applicationKey, @Query("nrql") String query); }
/** * @param userId The username of the user * @param resourceType The resource type in question (application, account, etc.) * @param resourceName The name of the resource * @param authorization The authorization in question (read, write, etc) * @return True if the user has access to the specified resource. */ @GET("/authorize/{userId}/{resourceType}/{resourceName}/{authorization}") Response hasAuthorization(@Path("userId") String userId, @Path("resourceType") String resourceType, @Path("resourceName") String resourceName, @Path("authorization") String authorization);
/** * @param userId The user being logged out * @return ignored. */ @DELETE("/roles/{userId}") Response logoutUser(@Path("userId") String userId); }
@GET("/tokens/fetch/{tokentype}") HatchetAuthResponse getAccessToken( @Header("Authorization") String bearerAccessToken, @Path("tokentype") String tokentype );
@DELETE("/playlists/{playlist-id}") Response deletePlaylists( @Header("Authorization") String accesstoken, @Path("playlist-id") String playlist_id );
@DELETE("/relationships/{relationship-id}") Response deleteRelationShip( @Header("Authorization") String accesstoken, @Path("relationship-id") String relationship_id );
/** * @param userId The user being logged in * @param ignored ignored. * @return ignored. */ @POST("/roles/{userId}") Response loginUser(@Path("userId") String userId, @Body String ignored /* retrofit requires this */);
@PUT("/playlists/{playlist-id}") Response putPlaylists( @Header("Authorization") String accesstoken, @Path("playlist-id") String playlist_id, @Body TypedInput rawBody );
@DELETE("/playlistEntries/{entry-id}") Response deletePlaylistsPlaylistEntries( @Header("Authorization") String accesstoken, @Path("entry-id") String entry_id, @Query("playlist_id") String playlist_id );