|
|
@@ -11,57 +11,37 @@ interface Endpoint {
|
|
|
fun getCredentials(@Query("token") token: String): Single<Credentials>
|
|
|
|
|
|
@GET("books")
|
|
|
- fun getFinishedBooks(@Query("access-token") accessToken: String): Single<List<FinishedBook>>
|
|
|
+ fun getFinishedBooks(): Single<List<FinishedBook>>
|
|
|
|
|
|
@PUT("books/{id}")
|
|
|
- fun updateFinishedBook(
|
|
|
- @Path("id") id: String,
|
|
|
- @Query("access-token") accessToken: String,
|
|
|
- @Body book: FinishedBookToSend
|
|
|
- ): Completable
|
|
|
+ fun updateFinishedBook(@Path("id") id: String, @Body book: FinishedBookToSend): Completable
|
|
|
|
|
|
@POST("books")
|
|
|
- fun createFinishedBook(
|
|
|
- @Query("access-token") accessToken: String,
|
|
|
- @Body book: FinishedBookToSend
|
|
|
- ): Completable
|
|
|
+ fun createFinishedBook(@Body book: FinishedBookToSend): Completable
|
|
|
|
|
|
@DELETE("books/{id}")
|
|
|
- fun deleteFinishedBook(
|
|
|
- @Path("id") id: String,
|
|
|
- @Query("access-token") accessToken: String
|
|
|
- ): Completable
|
|
|
+ fun deleteFinishedBook(@Path("id") id: String): Completable
|
|
|
|
|
|
@GET("wishes")
|
|
|
- fun getPlannedBooks(@Query("access-token") accessToken: String): Single<List<PlannedBook>>
|
|
|
+ fun getPlannedBooks(): Single<List<PlannedBook>>
|
|
|
|
|
|
@PUT("wishes/{id}")
|
|
|
- fun updatePlannedBook(
|
|
|
- @Path("id") id: String,
|
|
|
- @Query("access-token") accessToken: String,
|
|
|
- @Body book: PlannedBookToSend
|
|
|
- ): Completable
|
|
|
+ fun updatePlannedBook(@Path("id") id: String, @Body book: PlannedBookToSend): Completable
|
|
|
|
|
|
@POST("wishes")
|
|
|
- fun createPlannedBook(
|
|
|
- @Query("access-token") accessToken: String,
|
|
|
- @Body book: PlannedBookToSend
|
|
|
- ): Completable
|
|
|
+ fun createPlannedBook(@Body book: PlannedBookToSend): Completable
|
|
|
|
|
|
@DELETE("wishes/{id}")
|
|
|
- fun deletePlannedBook(
|
|
|
- @Path("id") id: String,
|
|
|
- @Query("access-token") accessToken: String
|
|
|
- ): Completable
|
|
|
+ fun deletePlannedBook(@Path("id") id: String): Completable
|
|
|
|
|
|
@GET("books/latest-notes")
|
|
|
fun getLatestBooksWithNotes(): Single<Map<String, Note>>
|
|
|
|
|
|
@GET("subscriptions")
|
|
|
- fun getSubscriptions(@Query("access-token") accessToken: String): Single<List<Subscription>>
|
|
|
+ fun getSubscriptions(): Single<List<Subscription>>
|
|
|
|
|
|
@GET("users/current")
|
|
|
- fun getProfile(@Query("access-token") accessToken: String): Single<User>
|
|
|
+ fun getProfile(): Single<User>
|
|
|
|
|
|
@GET("users/{id}/books")
|
|
|
fun getUserBooks(@Path("id") userId: String): Single<List<FinishedBook>>
|
|
|
@@ -70,21 +50,12 @@ interface Endpoint {
|
|
|
fun getUser(@Path("id") userId: String): Single<User>
|
|
|
|
|
|
@PUT("users/{id}")
|
|
|
- fun updateProfile(
|
|
|
- @Path("id") userId: String,
|
|
|
- @Query("access-token") accessToken: String,
|
|
|
- @Body profile: Profile
|
|
|
- ): Completable
|
|
|
+ fun updateProfile(@Path("id") userId: String, @Body profile: Profile): Completable
|
|
|
|
|
|
@POST("subscriptions/{subUserId}")
|
|
|
- fun createSubscription(
|
|
|
- @Path("subUserId") userId: String,
|
|
|
- @Query("access-token") accessToken: String
|
|
|
- ): Single<Any>
|
|
|
+ fun createSubscription(@Path("subUserId") userId: String): Single<Any>
|
|
|
|
|
|
@DELETE("subscriptions/{subUserId}")
|
|
|
- fun deleteSubscription(
|
|
|
- @Path("subUserId") userId: String,
|
|
|
- @Query("access-token") accessToken: String
|
|
|
- ): Single<Any>
|
|
|
+ fun deleteSubscription(@Path("subUserId") userId: String): Single<Any>
|
|
|
+
|
|
|
}
|