109 lines
3.6 KiB
C#
109 lines
3.6 KiB
C#
using System.Threading;
|
|
using xBotService.Models;
|
|
using xBotService.Constants;
|
|
using System.Threading.Tasks;
|
|
using System.Collections.Generic;
|
|
using xCommons.Extensions;
|
|
using xBotService.Models.Dtos;
|
|
|
|
namespace xBotService.Interfaces
|
|
{
|
|
public interface IXBotProvider
|
|
{
|
|
/// <summary>
|
|
/// Retrieve Bot Info ...
|
|
/// </summary>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotResUser> GetMe(
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Retrieve Messages ...
|
|
/// </summary>
|
|
/// <param name="requestModel"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IList<XBotUpdateResponse>> GetUpdates(
|
|
XBotUpdatesRequest requestModel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Sending Simple String Message to Bot ...
|
|
/// </summary>
|
|
/// <param name="requestModel"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> SendMessage(
|
|
XBotSendMessageRequest requestModel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Show Verification Request Menu ...
|
|
/// </summary>
|
|
/// <param name="botUserId"></param>
|
|
/// <param name="label"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> ShowVerificationMenu(
|
|
long botUserId,
|
|
string label = XBotMessageIds.XBotRequestVerificationCodeLabel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Send Verification Code to Requests ...
|
|
/// </summary>
|
|
/// <param name="botUser"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> SendVerificationCode(
|
|
XBotUserDto botUser,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// an Accept for Exit Loading on Bot ...
|
|
/// </summary>
|
|
/// <param name="callbackQueryId"></param>
|
|
/// <param name="text"></param>
|
|
/// <param name="showAlert"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
// Task<XBotMessageResponse> AnswerCallbackQuery(
|
|
// string callbackQueryId,
|
|
// string text = null,
|
|
// bool showAlert = false,
|
|
// CancellationToken cancellationToken = default
|
|
// );
|
|
|
|
/// <summary>
|
|
/// Remove Inline Keyboard After Click (Optional) ...
|
|
/// </summary>
|
|
/// <param name="chatId"></param>
|
|
/// <param name="messageId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
// Task<XBotMessageResponse> RemoveInlineKeyboard(
|
|
// long chatId,
|
|
// long messageId,
|
|
// CancellationToken cancellationToken = default
|
|
// );
|
|
|
|
/// <summary>
|
|
/// Set Webhook for Retrieve Messages on Recieved ...
|
|
/// </summary>
|
|
/// <param name="webhookUrl"></param>
|
|
/// <param name="secretToken"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
// Task<bool> SetWebhook(
|
|
// string webhookUrl,
|
|
// string secretToken = null,
|
|
// CancellationToken cancellationToken = default
|
|
// );
|
|
}
|
|
} |