Skip to content

piiraa/telegram-bot-rb

Repository files navigation

telegram-bot-openapi

TelegramBotOpenapi - the Ruby gem for the telegram-bot-api

Unofficial telegram-bot-api OpenAPI spec. Generated from the Bot API docs at https://core.telegram.org/bots/api

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: Bot API 7.2
  • Package version: 1.0.0
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build telegram-bot-openapi.gemspec

Then either install the gem locally:

gem install ./telegram-bot-openapi-1.0.0.gem

(for development, run gem install --dev ./telegram-bot-openapi-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'telegram-bot-openapi', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'telegram-bot-openapi', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'telegram-bot-openapi'

api_instance = TelegramBotOpenapi::DefaultApi.new
user_id = 789 # Integer | 
name = 'name_example' # String | 
sticker = TelegramBotOpenapi::InputSticker.new({sticker: { key: nil}, format: 'format_example', emoji_list: ['emoji_list_example']}) # InputSticker | 

begin
  #addStickerToSet
  result = api_instance.add_sticker_to_set(user_id, name, sticker)
  p result
rescue TelegramBotOpenapi::ApiError => e
  puts "Exception when calling DefaultApi->add_sticker_to_set: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.telegram.org/bot123:XYZ

Class Method HTTP request Description
TelegramBotOpenapi::DefaultApi add_sticker_to_set POST /addStickerToSet addStickerToSet
TelegramBotOpenapi::DefaultApi answer_callback_query POST /answerCallbackQuery answerCallbackQuery
TelegramBotOpenapi::DefaultApi answer_inline_query POST /answerInlineQuery answerInlineQuery
TelegramBotOpenapi::DefaultApi answer_pre_checkout_query POST /answerPreCheckoutQuery answerPreCheckoutQuery
TelegramBotOpenapi::DefaultApi answer_shipping_query POST /answerShippingQuery answerShippingQuery
TelegramBotOpenapi::DefaultApi answer_web_app_query POST /answerWebAppQuery answerWebAppQuery
TelegramBotOpenapi::DefaultApi approve_chat_join_request POST /approveChatJoinRequest approveChatJoinRequest
TelegramBotOpenapi::DefaultApi ban_chat_member POST /banChatMember banChatMember
TelegramBotOpenapi::DefaultApi ban_chat_sender_chat POST /banChatSenderChat banChatSenderChat
TelegramBotOpenapi::DefaultApi close POST /close close
TelegramBotOpenapi::DefaultApi close_forum_topic POST /closeForumTopic closeForumTopic
TelegramBotOpenapi::DefaultApi close_general_forum_topic POST /closeGeneralForumTopic closeGeneralForumTopic
TelegramBotOpenapi::DefaultApi copy_message POST /copyMessage copyMessage
TelegramBotOpenapi::DefaultApi copy_messages POST /copyMessages copyMessages
TelegramBotOpenapi::DefaultApi create_chat_invite_link POST /createChatInviteLink createChatInviteLink
TelegramBotOpenapi::DefaultApi create_forum_topic POST /createForumTopic createForumTopic
TelegramBotOpenapi::DefaultApi create_invoice_link POST /createInvoiceLink createInvoiceLink
TelegramBotOpenapi::DefaultApi create_new_sticker_set POST /createNewStickerSet createNewStickerSet
TelegramBotOpenapi::DefaultApi decline_chat_join_request POST /declineChatJoinRequest declineChatJoinRequest
TelegramBotOpenapi::DefaultApi delete_chat_photo POST /deleteChatPhoto deleteChatPhoto
TelegramBotOpenapi::DefaultApi delete_chat_sticker_set POST /deleteChatStickerSet deleteChatStickerSet
TelegramBotOpenapi::DefaultApi delete_forum_topic POST /deleteForumTopic deleteForumTopic
TelegramBotOpenapi::DefaultApi delete_message POST /deleteMessage deleteMessage
TelegramBotOpenapi::DefaultApi delete_messages POST /deleteMessages deleteMessages
TelegramBotOpenapi::DefaultApi delete_my_commands POST /deleteMyCommands deleteMyCommands
TelegramBotOpenapi::DefaultApi delete_sticker_from_set POST /deleteStickerFromSet deleteStickerFromSet
TelegramBotOpenapi::DefaultApi delete_sticker_set POST /deleteStickerSet deleteStickerSet
TelegramBotOpenapi::DefaultApi delete_webhook POST /deleteWebhook deleteWebhook
TelegramBotOpenapi::DefaultApi edit_chat_invite_link POST /editChatInviteLink editChatInviteLink
TelegramBotOpenapi::DefaultApi edit_forum_topic POST /editForumTopic editForumTopic
TelegramBotOpenapi::DefaultApi edit_general_forum_topic POST /editGeneralForumTopic editGeneralForumTopic
TelegramBotOpenapi::DefaultApi edit_message_caption POST /editMessageCaption editMessageCaption
TelegramBotOpenapi::DefaultApi edit_message_live_location POST /editMessageLiveLocation editMessageLiveLocation
TelegramBotOpenapi::DefaultApi edit_message_media POST /editMessageMedia editMessageMedia
TelegramBotOpenapi::DefaultApi edit_message_reply_markup POST /editMessageReplyMarkup editMessageReplyMarkup
TelegramBotOpenapi::DefaultApi edit_message_text POST /editMessageText editMessageText
TelegramBotOpenapi::DefaultApi export_chat_invite_link POST /exportChatInviteLink exportChatInviteLink
TelegramBotOpenapi::DefaultApi forward_message POST /forwardMessage forwardMessage
TelegramBotOpenapi::DefaultApi forward_messages POST /forwardMessages forwardMessages
TelegramBotOpenapi::DefaultApi get_business_connection POST /getBusinessConnection getBusinessConnection
TelegramBotOpenapi::DefaultApi get_chat POST /getChat getChat
TelegramBotOpenapi::DefaultApi get_chat_administrators POST /getChatAdministrators getChatAdministrators
TelegramBotOpenapi::DefaultApi get_chat_member POST /getChatMember getChatMember
TelegramBotOpenapi::DefaultApi get_chat_member_count POST /getChatMemberCount getChatMemberCount
TelegramBotOpenapi::DefaultApi get_chat_menu_button POST /getChatMenuButton getChatMenuButton
TelegramBotOpenapi::DefaultApi get_custom_emoji_stickers POST /getCustomEmojiStickers getCustomEmojiStickers
TelegramBotOpenapi::DefaultApi get_file POST /getFile getFile
TelegramBotOpenapi::DefaultApi get_forum_topic_icon_stickers POST /getForumTopicIconStickers getForumTopicIconStickers
TelegramBotOpenapi::DefaultApi get_game_high_scores POST /getGameHighScores getGameHighScores
TelegramBotOpenapi::DefaultApi get_me POST /getMe getMe
TelegramBotOpenapi::DefaultApi get_my_commands POST /getMyCommands getMyCommands
TelegramBotOpenapi::DefaultApi get_my_default_administrator_rights POST /getMyDefaultAdministratorRights getMyDefaultAdministratorRights
TelegramBotOpenapi::DefaultApi get_my_description POST /getMyDescription getMyDescription
TelegramBotOpenapi::DefaultApi get_my_name POST /getMyName getMyName
TelegramBotOpenapi::DefaultApi get_my_short_description POST /getMyShortDescription getMyShortDescription
TelegramBotOpenapi::DefaultApi get_sticker_set POST /getStickerSet getStickerSet
TelegramBotOpenapi::DefaultApi get_updates POST /getUpdates getUpdates
TelegramBotOpenapi::DefaultApi get_user_chat_boosts POST /getUserChatBoosts getUserChatBoosts
TelegramBotOpenapi::DefaultApi get_user_profile_photos POST /getUserProfilePhotos getUserProfilePhotos
TelegramBotOpenapi::DefaultApi get_webhook_info POST /getWebhookInfo getWebhookInfo
TelegramBotOpenapi::DefaultApi hide_general_forum_topic POST /hideGeneralForumTopic hideGeneralForumTopic
TelegramBotOpenapi::DefaultApi leave_chat POST /leaveChat leaveChat
TelegramBotOpenapi::DefaultApi log_out POST /logOut logOut
TelegramBotOpenapi::DefaultApi pin_chat_message POST /pinChatMessage pinChatMessage
TelegramBotOpenapi::DefaultApi promote_chat_member POST /promoteChatMember promoteChatMember
TelegramBotOpenapi::DefaultApi reopen_forum_topic POST /reopenForumTopic reopenForumTopic
TelegramBotOpenapi::DefaultApi reopen_general_forum_topic POST /reopenGeneralForumTopic reopenGeneralForumTopic
TelegramBotOpenapi::DefaultApi replace_sticker_in_set POST /replaceStickerInSet replaceStickerInSet
TelegramBotOpenapi::DefaultApi restrict_chat_member POST /restrictChatMember restrictChatMember
TelegramBotOpenapi::DefaultApi revoke_chat_invite_link POST /revokeChatInviteLink revokeChatInviteLink
TelegramBotOpenapi::DefaultApi send_animation POST /sendAnimation sendAnimation
TelegramBotOpenapi::DefaultApi send_audio POST /sendAudio sendAudio
TelegramBotOpenapi::DefaultApi send_chat_action POST /sendChatAction sendChatAction
TelegramBotOpenapi::DefaultApi send_contact POST /sendContact sendContact
TelegramBotOpenapi::DefaultApi send_dice POST /sendDice sendDice
TelegramBotOpenapi::DefaultApi send_document POST /sendDocument sendDocument
TelegramBotOpenapi::DefaultApi send_game POST /sendGame sendGame
TelegramBotOpenapi::DefaultApi send_invoice POST /sendInvoice sendInvoice
TelegramBotOpenapi::DefaultApi send_location POST /sendLocation sendLocation
TelegramBotOpenapi::DefaultApi send_media_group POST /sendMediaGroup sendMediaGroup
TelegramBotOpenapi::DefaultApi send_message POST /sendMessage sendMessage
TelegramBotOpenapi::DefaultApi send_photo POST /sendPhoto sendPhoto
TelegramBotOpenapi::DefaultApi send_poll POST /sendPoll sendPoll
TelegramBotOpenapi::DefaultApi send_sticker POST /sendSticker sendSticker
TelegramBotOpenapi::DefaultApi send_venue POST /sendVenue sendVenue
TelegramBotOpenapi::DefaultApi send_video POST /sendVideo sendVideo
TelegramBotOpenapi::DefaultApi send_video_note POST /sendVideoNote sendVideoNote
TelegramBotOpenapi::DefaultApi send_voice POST /sendVoice sendVoice
TelegramBotOpenapi::DefaultApi set_chat_administrator_custom_title POST /setChatAdministratorCustomTitle setChatAdministratorCustomTitle
TelegramBotOpenapi::DefaultApi set_chat_description POST /setChatDescription setChatDescription
TelegramBotOpenapi::DefaultApi set_chat_menu_button POST /setChatMenuButton setChatMenuButton
TelegramBotOpenapi::DefaultApi set_chat_permissions POST /setChatPermissions setChatPermissions
TelegramBotOpenapi::DefaultApi set_chat_photo POST /setChatPhoto setChatPhoto
TelegramBotOpenapi::DefaultApi set_chat_sticker_set POST /setChatStickerSet setChatStickerSet
TelegramBotOpenapi::DefaultApi set_chat_title POST /setChatTitle setChatTitle
TelegramBotOpenapi::DefaultApi set_custom_emoji_sticker_set_thumbnail POST /setCustomEmojiStickerSetThumbnail setCustomEmojiStickerSetThumbnail
TelegramBotOpenapi::DefaultApi set_game_score POST /setGameScore setGameScore
TelegramBotOpenapi::DefaultApi set_message_reaction POST /setMessageReaction setMessageReaction
TelegramBotOpenapi::DefaultApi set_my_commands POST /setMyCommands setMyCommands
TelegramBotOpenapi::DefaultApi set_my_default_administrator_rights POST /setMyDefaultAdministratorRights setMyDefaultAdministratorRights
TelegramBotOpenapi::DefaultApi set_my_description POST /setMyDescription setMyDescription
TelegramBotOpenapi::DefaultApi set_my_name POST /setMyName setMyName
TelegramBotOpenapi::DefaultApi set_my_short_description POST /setMyShortDescription setMyShortDescription
TelegramBotOpenapi::DefaultApi set_passport_data_errors POST /setPassportDataErrors setPassportDataErrors
TelegramBotOpenapi::DefaultApi set_sticker_emoji_list POST /setStickerEmojiList setStickerEmojiList
TelegramBotOpenapi::DefaultApi set_sticker_keywords POST /setStickerKeywords setStickerKeywords
TelegramBotOpenapi::DefaultApi set_sticker_mask_position POST /setStickerMaskPosition setStickerMaskPosition
TelegramBotOpenapi::DefaultApi set_sticker_position_in_set POST /setStickerPositionInSet setStickerPositionInSet
TelegramBotOpenapi::DefaultApi set_sticker_set_thumbnail POST /setStickerSetThumbnail setStickerSetThumbnail
TelegramBotOpenapi::DefaultApi set_sticker_set_title POST /setStickerSetTitle setStickerSetTitle
TelegramBotOpenapi::DefaultApi set_webhook POST /setWebhook setWebhook
TelegramBotOpenapi::DefaultApi stop_message_live_location POST /stopMessageLiveLocation stopMessageLiveLocation
TelegramBotOpenapi::DefaultApi stop_poll POST /stopPoll stopPoll
TelegramBotOpenapi::DefaultApi unban_chat_member POST /unbanChatMember unbanChatMember
TelegramBotOpenapi::DefaultApi unban_chat_sender_chat POST /unbanChatSenderChat unbanChatSenderChat
TelegramBotOpenapi::DefaultApi unhide_general_forum_topic POST /unhideGeneralForumTopic unhideGeneralForumTopic
TelegramBotOpenapi::DefaultApi unpin_all_chat_messages POST /unpinAllChatMessages unpinAllChatMessages
TelegramBotOpenapi::DefaultApi unpin_all_forum_topic_messages POST /unpinAllForumTopicMessages unpinAllForumTopicMessages
TelegramBotOpenapi::DefaultApi unpin_all_general_forum_topic_messages POST /unpinAllGeneralForumTopicMessages unpinAllGeneralForumTopicMessages
TelegramBotOpenapi::DefaultApi unpin_chat_message POST /unpinChatMessage unpinChatMessage
TelegramBotOpenapi::DefaultApi upload_sticker_file POST /uploadStickerFile uploadStickerFile

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

About

openapi generated telegram bot ruby client, schema source https://github.com/PaulSonOfLars/telegram-bot-api-spec/pull/81

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published