last works ...
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
using xBotService.Models;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using xBotService.Constants;
|
||||
using System.Threading;
|
||||
|
||||
namespace xBotService.Interfaces
|
||||
{
|
||||
public interface IXBotProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieve Bot Info ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XBotResUser> GetMe(
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Sending Simple String Message to Bot ...
|
||||
/// </summary>
|
||||
/// <param name="chatId"></param>
|
||||
/// <param name="text"></param>
|
||||
/// <param name="replyMarkup"></param>
|
||||
/// <param name="parseMode"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XBotMessageResponse> SendMessage(
|
||||
long chatId,
|
||||
string text,
|
||||
XBotReplyMarkup replyMarkup = null,
|
||||
XBotMessageParseMode parseMode = XBotMessageParseMode.Html,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Sending Verification Request Menu ...
|
||||
/// </summary>
|
||||
/// <param name="chatId"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XBotMessageResponse> SendVerificationMenu(
|
||||
long chatId,
|
||||
string label = "🔐 دریافت کد وریفیکیشن",
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Send Verification Code to Requests ...
|
||||
/// </summary>
|
||||
/// <param name="chatId"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="ttlSeconds"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XBotMessageResponse> SendVerificationCode(
|
||||
long chatId,
|
||||
string code,
|
||||
int ttlSeconds,
|
||||
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>
|
||||
/// Retrieve Messages ...
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="timeout"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<XBotUpdate>> GetUpdates(
|
||||
long offset = 0,
|
||||
int timeout = 30,
|
||||
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
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user