package com.red.circle.other.adapter.app.imtrtc;

import com.red.circle.external.inner.endpoint.tencent.api.ImClientApi;
import com.red.circle.external.inner.model.cmd.message.google.ImRoomRemoveUserCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author longli on  2024/3/25
 */

@RestController
@RequestMapping(value = "/im-trtc", produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class ImTrtcRestController {

  private final ImClientApi imClientApi;

  /**
   * 将用户从房间移出.
   *
   * @eo.name 将用户从房间移出.
   * @eo.url /room/remove-user
   * @eo.method get
   * @eo.request-type formdata
   */
  @GetMapping(value = "/room/remove-user")
  public Boolean removeUser(ImRoomRemoveUserCmd cmd) {
    return imClientApi
        .removeUser(cmd).getBody();
  }

}
