Class AbstractBaseRequest<T,R>

java.lang.Object
io.github.natanimn.telebof.requests.AbstractBaseRequest<T,R>
Direct Known Subclasses:
AddStickerToSet, AnswerCallbackQuery, AnswerInlineQuery, AnswerPreCheckoutQuery, AnswerShippingQuery, AnswerWebAppQuery, ApproveChatJoinRequest, ApproveSuggestedPost, BanChatMember, BanChatSenderChat, Close, CloseForumTopic, CloseGeneralForumTopic, ConvertGiftToStars, CopyMessage, CopyMessages, CreateChatInviteLink, CreateChatSubscriptionInviteLink, CreateForumTopic, CreateInvoiceLink, CreateNewStickerSet, DeclineChatJoinRequest, DeclineSuggestedPost, DeleteBusinessMessages, DeleteChatPhoto, DeleteChatStickerSet, DeleteForumTopic, DeleteMessage, DeleteMessages, DeleteMyCommands, DeleteStickerFromSet, DeleteStickerSet, DeleteStory, DeleteWebhook, EditChatInviteLink, EditChatSubscriptionInviteLink, EditForumTopic, EditGeneralForumTopic, EditMessageCaption, EditMessageChecklist, EditMessageLiveLocation, EditMessageMedia, EditMessageReplyMarkup, EditMessageText, EditStory, EditUserStarSubscription, ExportChatInviteLink, ForwardMessage, ForwardMessages, GetAvailableGifts, GetBusinessAccountGifts, GetBusinessAccountStarBalance, GetBusinessConnection, GetChat, GetChatAdministrators, GetChatGifts, GetChatMember, GetChatMemberCount, GetChatMenuButton, GetCustomEmojiStickers, GetFile, GetForumTopicIconStickers, GetGameHighScores, GetMe, GetMyCommands, GetMyDefaultAdministratorRights, GetMyDescription, GetMyName, GetMyShortDescription, GetMyStarBalance, GetStarTransactions, GetStickerSet, GetUpdates, GetUserChatBoosts, GetUserGifts, GetUserProfileAudios, GetUserProfilePhotos, GetWebhookInfo, GiftPremiumSubscription, HideGeneralForumTopic, LeaveChat, LogOut, PinChatMessage, PostStory, PromoteChatMember, ReadBusinessMessage, RefundStarPayment, RemoveBusinessAccountProfilePhoto, RemoveChatVerification, RemoveMyProfilePhoto, RemoveUserVerification, ReopenForumTopic, ReopenGeneralForumTopic, ReplaceStickerInSet, RepostStory, RestrictChatMember, RevokeChatInviteLink, SavePreparedInlineMessage, SendBuilder, SendChatAction, SendChecklist, SendGift, SendLocation, SendMessageDraft, SendPaidMedia, SendPoll, SetBusinessAccountBio, SetBusinessAccountGiftSettings, SetBusinessAccountName, SetBusinessAccountProfilePhoto, SetBusinessAccountUsername, SetChatAdministratorCustomTitle, SetChatDescription, SetChatMenuButton, SetChatPermissions, SetChatPhoto, SetChatStickerSet, SetChatTitle, SetCustomEmojiStickerSetThumbnail, SetGameScore, SetMessageReaction, SetMyCommands, SetMyDefaultAdministratorRights, SetMyDescription, SetMyName, SetMyProfilePhoto, SetMyShortDescription, SetPassportDataErrors, SetStickerEmojiList, SetStickerKeywords, SetStickerMaskPosition, SetStickerPositionInSet, SetStickerSetThumbnail, SetStickerSetTitle, SetUserEmojiStatus, SetWebhook, StopMessageLiveLocation, StopPoll, TransferBusinessAccountStars, TransferGift, UnbanChatMember, UnbanChatSenderChat, UnHideGeneralForumTopic, UnpinAllChatMessages, UnpinAllForumTopicMessages, UnpinAllGeneralForumTopicMessages, UnpinChatMessage, UpgradeGift, UploadStickerFile, VerifyChat, VerifyUser

public abstract class AbstractBaseRequest<T,R> extends Object
Request builder class for Telegram methods
Since:
3 March 2025
Version:
1.3.0
Author:
Natanim
  • Field Details

  • Constructor Details

    • AbstractBaseRequest

      public AbstractBaseRequest(Object chatId, Api api, String methodName, Type responseType)
    • AbstractBaseRequest

      public AbstractBaseRequest(Api api, String methodName, Type responseType)
    • AbstractBaseRequest

      public AbstractBaseRequest(Api api, String methodName)
  • Method Details

    • getResponseType

      protected Type getResponseType()
    • add

      protected final T add(String key, Object values)
    • setHasMultipart

      protected void setHasMultipart(boolean hasMultipart)
    • getParameters

      protected Map<String,Object> getParameters()
    • getMethodName

      protected String getMethodName()
    • hasMultipart

      protected boolean hasMultipart()
    • getContentType

      protected String getContentType()
    • exec

      public final R exec()
      executes the request to Telegram.
      Returns:
      AbstractBaseRequest