Class: TD::Types::Base

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

Direct Known Subclasses

AccountTtl, Address, AnimatedChatPhoto, Animation, Animations, Audio, AuthenticationCodeInfo, AuthenticationCodeType, AuthorizationState, AutoDownloadSettings, AutoDownloadSettingsPresets, Background, BackgroundFill, BackgroundType, Backgrounds, BankCardActionOpenUrl, BankCardInfo, BasicGroup, BasicGroupFullInfo, BotCommand, BotInfo, Call, CallDiscardReason, CallId, CallProblem, CallProtocol, CallServer, CallServerType, CallState, CallbackQueryAnswer, CallbackQueryPayload, CanTransferOwnershipResult, Chat, ChatAction, ChatActionBar, ChatAdministrator, ChatAdministrators, ChatEvent, ChatEventAction, ChatEventLogFilters, ChatEvents, ChatFilter, ChatFilterInfo, ChatInviteLink, ChatInviteLinkCount, ChatInviteLinkCounts, ChatInviteLinkInfo, ChatInviteLinkMember, ChatInviteLinkMembers, ChatInviteLinks, ChatList, ChatLists, ChatLocation, ChatMember, ChatMemberStatus, ChatMembers, ChatMembersFilter, ChatNearby, ChatNotificationSettings, ChatPermissions, ChatPhoto, ChatPhotoInfo, ChatPhotos, ChatPosition, ChatReportReason, ChatSource, ChatStatistics, ChatStatisticsAdministratorActionsInfo, ChatStatisticsInviterInfo, ChatStatisticsMessageInteractionInfo, ChatStatisticsMessageSenderInfo, ChatType, Chats, ChatsNearby, CheckChatUsernameResult, ClosedVectorPath, ConnectedWebsite, ConnectedWebsites, ConnectionState, Contact, Count, Countries, CountryInfo, CustomRequestResult, DatabaseStatistics, Date, DateRange, DatedFile, DeepLinkInfo, DeviceToken, DiceStickers, Document, DraftMessage, EmailAddressAuthenticationCodeInfo, Emojis, EncryptedCredentials, EncryptedPassportElement, Error, File, FilePart, FileType, FormattedText, FoundMessages, Game, GameHighScore, GameHighScores, GroupCall, GroupCallId, GroupCallJoinResponse, GroupCallJoinResponseCandidate, GroupCallParticipant, GroupCallPayload, GroupCallPayloadFingerprint, GroupCallRecentSpeaker, Hashtags, HttpUrl, IdentityDocument, ImportedContacts, InlineKeyboardButton, InlineKeyboardButtonType, InlineQueryResult, InlineQueryResults, InputBackground, InputChatPhoto, 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, MessageCopyOptions, MessageFileType, MessageForwardInfo, MessageForwardOrigin, MessageInteractionInfo, MessageLink, MessageLinkInfo, MessageReplyInfo, MessageSchedulingState, MessageSendOptions, MessageSender, MessageSenders, MessageSendingState, MessageStatistics, MessageThreadInfo, 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, PaymentFormTheme, PaymentReceipt, PaymentResult, PaymentsProviderStripe, PersonalDetails, PersonalDocument, PhoneNumberAuthenticationSettings, PhoneNumberInfo, Photo, PhotoSize, Point, Poll, PollOption, PollType, ProfilePhoto, Proxies, Proxy, ProxyType, PublicChatType, PushMessageContent, PushReceiverId, RecommendedChatFilter, RecommendedChatFilters, RecoveryEmailAddress, RemoteFile, ReplyMarkup, RichText, SavedCredentials, ScopeNotificationSettings, SearchMessagesFilter, Seconds, SecretChat, SecretChatState, Session, Sessions, ShippingOption, StatisticalGraph, StatisticalValue, Sticker, StickerSet, StickerSetInfo, StickerSets, Stickers, StorageStatistics, StorageStatisticsByChat, StorageStatisticsByFileType, StorageStatisticsFast, SuggestedAction, Supergroup, SupergroupFullInfo, SupergroupMembersFilter, TMeUrl, TMeUrlType, TMeUrls, TdlibParameters, TemporaryPasswordState, TermsOfService, Text, TextEntities, TextEntity, TextEntityType, TextParseMode, Thumbnail, ThumbnailFormat, TopChatCategory, Update, Updates, User, UserFullInfo, UserPrivacySetting, UserPrivacySettingRule, UserPrivacySettingRules, UserStatus, UserType, Users, ValidatedOrderInfo, VectorPathCommand, Venue, Video, VideoNote, VoiceChat, VoiceNote, WebPage, WebPageInstantView

Instance Method Summary collapse

Instance Method Details

#to_hashObject Also known as: to_h



17
18
19
# File 'lib/tdlib/types/base.rb', line 17

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

#to_json(*args) ⇒ Object



22
23
24
# File 'lib/tdlib/types/base.rb', line 22

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