package com.adealink.weparty.profile.datasource.remote

import com.adealink.frame.base.Rlt
import com.adealink.frame.network.data.Res
import com.adealink.weparty.profile.data.GetUserInfosRes
import com.adealink.weparty.profile.data.GetUserinfoReq
import com.adealink.weparty.profile.data.MyUserInfoRes
import com.adealink.weparty.profile.data.UpdateMyUserInfoReq
import com.adealink.weparty.profile.search.data.SearchRes
import retrofit2.http.Body
import retrofit2.http.Core
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ProfileHttpService {

    @Core
    @POST("user/my/info")
    suspend fun getMyUserInfo(): Rlt<Res<MyUserInfoRes>>

    @POST("user/my/info/edit")
    suspend fun updateUserInfo(
        @Body req: UpdateMyUserInfoReq
    ): Rlt<Res<Any>>

    @Core
    @POST("user/get/infos")
    suspend fun getUserInfosByUid(
        @Body req: GetUserinfoReq
    ): Rlt<Res<GetUserInfosRes>>


    @GET("user/search")
    suspend fun search(
        @Query("uid") uid: String
    ): Rlt<Res<SearchRes>>


}