/// <summary> /// Send bot action to chat /// </summary> /// <param name="actionRequestBody">(required)</param> /// <param name="chatId">Chat identifier (required)</param> /// <returns>SimpleQueryResult</returns> public SendActionQuery SendAction(ActionRequestBody actionRequestBody, long chatId) { if (actionRequestBody == null) { throw new RequiredParameterMissingException("Missing the required request body when calling sendAction"); } return(new SendActionQuery(_client, actionRequestBody, chatId)); }
/// <summary> /// Send action. /// </summary> public async Task <IApiResponse <SimpleQueryResult> > SendActionAsync(long chatId, ActionRequestBody action, CancellationToken cancellationToken = default) { IApiResponse <SimpleQueryResult> result = null; result = await SenderApi.PostAsync <SimpleQueryResult>(_connectorClient, GetApiUri($"chats/{chatId}/actions?access_token={_accessToken}"), action, cancellationToken); return(result); }
public SendActionQuery(TamTamClient client, ActionRequestBody actionRequestBody, long chatId) : base(client, $"/chats/{chatId}/actions", actionRequestBody, Method.POST) { }