package com.red.circle.external.inner.endpoint.message.api;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.external.inner.model.dto.AgoraChannelStateDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 声网.
 *
 * @author pengliang on 2023/7/12
 */
public interface AgoraClientApi {

    String API_PREFIX = "/agora/client";

    /**
     * 创建规则
     * @param cname
     * @param uid
     * @return
     */
    @GetMapping("/kicking/rule")
    ResultResponse<Void> kickingRule(@RequestParam("cname") String cname, @RequestParam("uid") String uid);

    /**
     * 查询主播列表
     * @param cname
     * @return
     */
    @GetMapping("/channel/host")
    ResultResponse<List<Long>> channelHost(@RequestParam("cname") String cname);

    /**
     * 查询用户列表
     * @param cname
     * @return
     */
    @GetMapping("/channel/user")
    ResultResponse<List<Long>> channelUser(@RequestParam("cname") String cname);

    /**
     * 查询频道状态.
     *
     * @param cname 频道名
     * @return 频道状态
     */
    @GetMapping("/channel/state")
    ResultResponse<AgoraChannelStateDTO> channelState(@RequestParam("cname") String cname);
}
