Jelajahi Sumber

Added endpoint for updating user profile

Vadik Sirekanyan 7 tahun lalu
induk
melakukan
c5ec9b7271

+ 6 - 0
app/src/main/java/me/vadik/knigopis/api/Endpoint.kt

@@ -73,6 +73,12 @@ interface Endpoint {
     @GET("users/{id}/books")
     fun getUserBooks(@Path("id") userId: String): Single<List<UserBook>>
 
+    @PUT("users/{id}")
+    fun updateProfile(
+        @Path("id") userId: String,
+        @Body profile: Profile
+    ): Completable
+
     @POST("subscriptions/{subUserId}")
     fun createSubscription(
         @Path("subUserId") userId: String,

+ 3 - 0
app/src/main/java/me/vadik/knigopis/model/Profile.kt

@@ -0,0 +1,3 @@
+package me.vadik.knigopis.model
+
+class Profile(val nickname: String, val profile: String)