package ru.myitschool.work.data.source

import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.PATCH
import retrofit2.http.Path
import ru.myitschool.work.data.dto.OpenQrDto
import ru.myitschool.work.data.dto.UserInfoDto

interface AccountApi {
    @GET("api/{username}/info")
    suspend fun getInfo(
        @Path("username") username: String
    ) : UserInfoDto

    @PATCH("api/{username}/open")
    suspend fun openByQr(
        @Path("username") username: String,
        @Body content: OpenQrDto
    )
}