[feat] Comic Bookmark
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.acitelight.aether.service
|
||||
|
||||
import com.acitelight.aether.model.BookMark
|
||||
import com.acitelight.aether.model.ChallengeResponse
|
||||
import com.acitelight.aether.model.ComicResponse
|
||||
import com.acitelight.aether.model.VideoResponse
|
||||
@@ -32,6 +33,8 @@ interface ApiInterface {
|
||||
@GET("api/image/{id}")
|
||||
suspend fun queryComicInfo(@Path("id") id: String, @Query("token") token: String): ComicResponse
|
||||
|
||||
@POST("api/image/{id}/bookmark")
|
||||
suspend fun postBookmark(@Path("id") id: String, @Query("token") token: String, @Body bookmark: BookMark)
|
||||
|
||||
@GET("api/user/{user}")
|
||||
suspend fun getChallenge(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.acitelight.aether.service
|
||||
|
||||
import com.acitelight.aether.model.BookMark
|
||||
import com.acitelight.aether.model.Comic
|
||||
import com.acitelight.aether.model.ComicResponse
|
||||
import com.acitelight.aether.model.Video
|
||||
@@ -69,4 +70,15 @@ object MediaManager
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun postBookmark(id: String, bookMark: BookMark): Boolean
|
||||
{
|
||||
try{
|
||||
val j = ApiClient.api!!.postBookmark(id, token, bookMark)
|
||||
return true
|
||||
}catch (e: Exception)
|
||||
{
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user