package com.mob5.smarthouse.common

import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.OPTIONS
import retrofit2.http.Header

interface RetApi {
    @OPTIONS("/user")
    fun login(@Header("email") email: String, @Header("password") password: String, @Header("uuid") uuid: String): Call<Login>

    @POST("/user")
    fun register(@Header("email") email: String, @Header("name") name: String, @Header("password") password: String, @Header("uuid") uuid: String): Call<HashMap<String, String>>

    @GET("/rooms")
    fun getRooms(@Header("token") token: String, @Header("uuid") uuid: String): Call<Rooms>

    @POST("/rooms")
    fun addRoom(@Header("name") name: String, @Header("type") type: String, @Header("token") token: String, @Header("uuid") uuid: String): Call<HashMap<String, String>>
}