Class: TD::Types::Base

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/tdlib/types/base.rb

Direct Known Subclasses

AccountTtl, Address, Animation, Animations, Audio, AuthenticationCodeInfo, AuthenticationCodeType, AuthorizationState, AutoDownloadSettings, AutoDownloadSettingsPresets, Background, BackgroundFill, BackgroundType, Backgrounds, BasicGroup, BasicGroupFullInfo, BotCommand, BotInfo, Call, CallConnection, CallDiscardReason, CallId, CallProblem, CallProtocol, CallState, CallbackQueryAnswer, CallbackQueryPayload, CanTransferOwnershipResult, Chat, ChatAction, ChatActionBar, ChatAdministrator, ChatAdministrators, ChatEvent, ChatEventAction, ChatEventLogFilters, ChatEvents, ChatInviteLink, ChatInviteLinkInfo, ChatList, ChatLocation, ChatMember, ChatMemberStatus, ChatMembers, ChatMembersFilter, ChatNearby, ChatNotificationSettings, ChatPermissions, ChatPhoto, ChatReportReason, ChatType, Chats, ChatsNearby, CheckChatUsernameResult, ConnectedWebsite, ConnectedWebsites, ConnectionState, Contact, Count, CustomRequestResult, DatabaseStatistics, Date, DatedFile, DeepLinkInfo, DeviceToken, Document, DraftMessage, EmailAddressAuthenticationCodeInfo, Emojis, EncryptedCredentials, EncryptedPassportElement, Error, File, FilePart, FileType, FormattedText, FoundMessages, Game, GameHighScore, GameHighScores, Hashtags, HttpUrl, IdentityDocument, ImportedContacts, InlineKeyboardButton, InlineKeyboardButtonType, InlineQueryResult, InlineQueryResults, InputBackground, InputCredentials, InputFile, InputIdentityDocument, InputInlineQueryResult, InputMessageContent, InputPassportElement, InputPassportElementError, InputPassportElementErrorSource, InputPersonalDocument, InputSticker, InputThumbnail, Invoice, JsonObjectMember, JsonValue, KeyboardButton, KeyboardButtonType, LabeledPricePart, LanguagePackInfo, LanguagePackString, LanguagePackStringValue, LanguagePackStrings, LocalFile, LocalizationTargetInfo, Location, LogStream, LogTags, LogVerbosityLevel, LoginUrlInfo, MaskPoint, MaskPosition, Message, MessageContent, MessageForwardInfo, MessageForwardOrigin, MessageLinkInfo, MessageSchedulingState, MessageSendingState, Messages, Minithumbnail, NetworkStatistics, NetworkStatisticsEntry, NetworkType, Notification, NotificationGroup, NotificationGroupType, NotificationSettingsScope, NotificationType, Ok, OptionValue, OrderInfo, PageBlock, PageBlockCaption, PageBlockHorizontalAlignment, PageBlockListItem, PageBlockRelatedArticle, PageBlockTableCell, PageBlockVerticalAlignment, PassportAuthorizationForm, PassportElement, PassportElementError, PassportElementErrorSource, PassportElementType, PassportElements, PassportElementsWithErrors, PassportRequiredElement, PassportSuitableElement, PasswordState, PaymentForm, PaymentReceipt, PaymentResult, PaymentsProviderStripe, PersonalDetails, PersonalDocument, PhoneNumberAuthenticationSettings, Photo, PhotoSize, Poll, PollOption, ProfilePhoto, Proxies, Proxy, ProxyType, PublicChatType, PublicMessageLink, PushMessageContent, PushReceiverId, RecoveryEmailAddress, RemoteFile, ReplyMarkup, RichText, SavedCredentials, ScopeNotificationSettings, SearchMessagesFilter, Seconds, SecretChat, SecretChatState, SendMessageOptions, Session, Sessions, ShippingOption, Sticker, StickerSet, StickerSetInfo, StickerSets, Stickers, StorageStatistics, StorageStatisticsByChat, StorageStatisticsByFileType, StorageStatisticsFast, Supergroup, SupergroupFullInfo, SupergroupMembersFilter, TMeUrl, TMeUrlType, TMeUrls, TdlibParameters, TemporaryPasswordState, TermsOfService, Text, TextEntities, TextEntity, TextEntityType, TextParseMode, TonLiteServerResponse, TonWalletPasswordSalt, TopChatCategory, Update, Updates, User, UserFullInfo, UserPrivacySetting, UserPrivacySettingRule, UserPrivacySettingRules, UserProfilePhoto, UserProfilePhotos, UserStatus, UserType, Users, ValidatedOrderInfo, Venue, Video, VideoNote, VoiceNote, WebPage, WebPageInstantView

Instance Method Summary collapse

Instance Method Details

#to_hashObject Also known as: to_h



20
21
22
# File 'lib/tdlib/types/base.rb', line 20

def to_hash
  { '@type' => LOOKUP_TABLE.key(self.class.name.sub('TD::Types::', '')) }.merge(super)
end

#to_json(*args) ⇒ Object



25
26
27
# File 'lib/tdlib/types/base.rb', line 25

def to_json(*args)
  to_hash.to_json(*args)
end