package com.renrenliao.im.model.api

import com.renrenliao.im.bean.*
import com.renrenliao.im.http.BaseResult
import com.renrenliao.im.im.GroupEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Url

/**
 **@ClassName ApiService
 **@Description
 **@Author ganzhe
 **@Date 2022/5/15 13:56
 **/
interface ApiService {



    @POST("api/config/appConfig")
    suspend fun test(@Body map: Map<String,String>):BaseResult<String>

    @GET
    suspend fun test1(@Url url:String):Any

    //获取线路配置
    @GET
    suspend fun getLines(@Url url: String): LineEntity

    //app通用配置

    @POST("api/config/appConfig")
    suspend fun appConfig(@Body map: Map<String, String>):BaseResult<AppConfigEntity>

    //登陆
    @POST("api/auth/login")
    suspend fun login(@Body  map: Map<String, String>): BaseResult<AuthInfo>

    //开屏广告
    @POST("api/config/openSAdv")
    suspend fun getAd(@Body map: Map<String, String>):BaseResult<Any>

    //查询银行卡
    @POST("api/bankCard/selectBankCard")
    suspend fun getBankCardList(@Body map: Map<String, String>):BaseResult<List<BankCardEntity>>

    //注销HTTP服务器的登陆
    @POST("api/auth/logout")
    suspend fun logOut(@Body map: Map<String, String>):BaseResult<Any>

    //修改用户信息
    @POST("api/auth/updateUser")
    suspend fun updateUserInfo(@Body map: Map<String, String>):BaseResult<UserInfo>

    //获取好友
    @POST("api/auth/getFriendsList")
    suspend fun getFriendList(@Body map: Map<String, String>):BaseResult<List<UserInfo>>

    //群主列表
    @POST("api/auth/getGroupInfoList")
    suspend fun getGroupList(@Body map: Map<String, String>):BaseResult<List<GroupEntity>>

    //创建群组
    @POST("api/group/createGroupChat")
    suspend fun createGroup(@Body map: Map<String, String>):BaseResult<GroupEntity>

    //查询好友
    @POST("api/friend/find")
    suspend fun friendFind(@Body map: Map<String, String>):BaseResult<UserInfo>
    //删除好友
    @POST("api/friend/deleteFriend")
    suspend fun deleteFriend(@Body map: Map<String, String>):BaseResult<Any>

    //添加好友
    @POST("api/friend/addFriend")
    suspend fun addFriend(@Body map: Map<String, String>):BaseResult<Any>

    //备注好友
    @POST("api/friend/friendRemark")
    suspend fun friendRemark(@Body map: Map<String, String>):BaseResult<Any>

    //朋友圈数据
    @POST("moment/release/releaseList")
    suspend fun getFriendCircle(@Body map: Map<String, String>):BaseResult<Any>

    //离线好友请求
    @POST("api/message/getOfflineFriend")
    suspend fun getOfflineFriend(@Body map: Map<String, String>):BaseResult<List<UserInfo>>

    //拒绝添加好友
    @POST("api/friend/refuseAddFriend")
    suspend fun rejectAddFriend(@Body map: Map<String, String>):BaseResult<Any>

    //同意添加好友
    @POST("api/friend/agreeAddFriend")
    suspend fun agreeAddFriend(@Body map: Map<String, String>):BaseResult<UserInfo>


}