package xyz.r0r5chach.dermy_app.api

import okhttp3.RequestBody
import org.json.JSONObject
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface DermyApiService {
    @GET("/account/sign-in/{username}")
    suspend fun getSalt(@Path("username") username: String): Map<String, String>

    @POST("/account/sign-in")
    suspend fun login(@Body loginForm: RequestBody): Map<String, String>

    @POST("/account/sign-up")
    suspend fun register(@Body loginForm: RequestBody): Map<String,String>

    @GET("/account/sign-out/{api}")
    suspend fun logout(@Path("api") apiKey: String): Map<String,String>

    @GET("/account/restore/{api}")
    suspend fun restore(@Path("api") apiKey: String): Map<String,String>

    @POST("/account/backup/{api}")
    suspend fun backup(@Path("api") apiKey: String, @Body backup: RequestBody): Map<String, String>

    @GET("/predict/{api}")
    suspend fun predict(@Path("api") apiKey: String, @Body image: RequestBody): Map<String, String>
}
