Pārlūkot izejas kodu

Removed unused endpoints

sirekanyan 7 gadi atpakaļ
vecāks
revīzija
33f9c65022

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

@@ -15,9 +15,6 @@ interface Endpoint {
     @GET("books")
     fun getFinishedBooks(@Query("access-token") accessToken: String): Single<List<FinishedBook>>
 
-    @GET("books/{id}")
-    fun getFinishedBook(@Path("id") id: String): Single<FinishedBook>
-
     @PUT("books/{id}")
     fun updateFinishedBook(
         @Path("id") id: String,
@@ -40,9 +37,6 @@ interface Endpoint {
     @GET("wishes")
     fun getPlannedBooks(@Query("access-token") accessToken: String): Single<List<PlannedBook>>
 
-    @GET("wishes/{id}")
-    fun getPlannedBook(@Path("id") id: String): Single<PlannedBook>
-
     @PUT("wishes/{id}")
     fun updatePlannedBook(
         @Path("id") id: String,
@@ -62,9 +56,6 @@ interface Endpoint {
         @Query("access-token") accessToken: String
     ): Completable
 
-    @GET("users/latest")
-    fun getLatestUsers(): Single<Map<String, User>>
-
     @GET("books/latest-notes")
     fun getLatestBooksWithNotes(): Single<Map<String, Note>>
 

+ 1 - 2
app/src/main/java/me/vadik/knigopis/model/FinishedBook.kt

@@ -8,8 +8,7 @@ class FinishedBook(
     val readMonth: String,
     val readYear: String,
     val notes: String,
-    val createdAt: String,
-    val user: User
+    val createdAt: String
 ) : Book {
     val order
         get() = arrayOf(readYear, readMonth, readDay)

+ 0 - 15
app/src/main/java/me/vadik/knigopis/model/User.kt

@@ -1,15 +0,0 @@
-package me.vadik.knigopis.model
-
-class User(
-    val id: String,
-    val nickname: String,
-    val booksCount: Int,
-    val updatedAt: String
-) {
-
-    val color: Int
-        get() {
-            val alpha = Math.min(0xff, booksCount)
-            return alpha shl 24
-        }
-}