Beispiel #1
0
 /// <summary>
 /// 发送私聊消息
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 public async Task SendPrivateMessage(PrivateMsgDto dto)
 {
     var request = new GetRequestResult <PrivateMsgDto>
     {
         Url  = $"{_baseUrl}{CQPProcessType.CQ_sendPrivateMsg.ToString()}",
         Data = dto
     };
     await RequestHelper.GetTResponseAsync <EmptyDto, PrivateMsgDto, GetRequestResult <PrivateMsgDto> >(request, Method.POST);
 }
 public async Task <NormalResult <Ranking> > SendPrivateMessage([FromBody] PrivateMsgDto dto)
 {
     await new CQPHelper(_configuration.GetSection("CqpApiUrl").Value).SendPrivateMessage(dto);
     return(new NormalResult <Ranking> {
         Data = new Ranking()
         {
             GoalBeyond = 1
         }
     });
 }