Module tdlight.api

Class TdApi.WebPage

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.WebPage
Enclosing class:
TdApi

public static final class TdApi.WebPage extends TdApi.Object
Describes a link preview.
  • Field Details

    • url

      public String url
      Original URL of the link.
    • displayUrl

      public String displayUrl
      URL to display.
    • type

      public String type
      Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else.
    • siteName

      public String siteName
      Short name of the site (e.g., Google Docs, App Store).
    • title

      public String title
      Title of the content.
    • description

      public TdApi.FormattedText description
      Description of the content.
    • photo

      public TdApi.Photo photo
      Image representing the content; may be null.
    • embedUrl

      public String embedUrl
      URL to show in the embedded preview.
    • embedType

      public String embedType
      MIME type of the embedded preview, (e.g., text/html or video/mp4).
    • embedWidth

      public int embedWidth
      Width of the embedded preview.
    • embedHeight

      public int embedHeight
      Height of the embedded preview.
    • duration

      public int duration
      Duration of the content, in seconds.
    • author

      public String author
      Author of the content.
    • hasLargeMedia

      public boolean hasLargeMedia
      True, if size of media in the preview can be changed.
    • showLargeMedia

      public boolean showLargeMedia
      True, if large media preview must be shown.
    • skipConfirmation

      public boolean skipConfirmation
      True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
    • showAboveText

      public boolean showAboveText
      True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
    • animation

      public TdApi.Animation animation
      Preview of the content as an animation, if available; may be null.
    • audio

      public TdApi.Audio audio
      Preview of the content as an audio file, if available; may be null.
    • document

      public TdApi.Document document
      Preview of the content as a document, if available; may be null.
    • sticker

      public TdApi.Sticker sticker
      Preview of the content as a sticker for small WEBP files, if available; may be null.
    • video

      public TdApi.Video video
      Preview of the content as a video, if available; may be null.
    • videoNote

      public TdApi.VideoNote videoNote
      Preview of the content as a video note, if available; may be null.
    • voiceNote

      public TdApi.VoiceNote voiceNote
      Preview of the content as a voice note, if available; may be null.
    • storySenderChatId

      public long storySenderChatId
      The identifier of the sender of the previewed story; 0 if none.
    • storyId

      public int storyId
      The identifier of the previewed story; 0 if none.
    • instantViewVersion

      public int instantViewVersion
      Version of web page instant view (currently, can be 1 or 2); 0 if none.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • WebPage

      public WebPage()
      Describes a link preview.
    • WebPage

      public WebPage(String url, String displayUrl, String type, String siteName, String title, TdApi.FormattedText description, TdApi.Photo photo, String embedUrl, String embedType, int embedWidth, int embedHeight, int duration, String author, boolean hasLargeMedia, boolean showLargeMedia, boolean skipConfirmation, boolean showAboveText, TdApi.Animation animation, TdApi.Audio audio, TdApi.Document document, TdApi.Sticker sticker, TdApi.Video video, TdApi.VideoNote videoNote, TdApi.VoiceNote voiceNote, long storySenderChatId, int storyId, int instantViewVersion)
      Describes a link preview.
      Parameters:
      url - Original URL of the link.
      displayUrl - URL to display.
      type - Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else.
      siteName - Short name of the site (e.g., Google Docs, App Store).
      title - Title of the content.
      description - Description of the content.
      photo - Image representing the content; may be null.
      embedUrl - URL to show in the embedded preview.
      embedType - MIME type of the embedded preview, (e.g., text/html or video/mp4).
      embedWidth - Width of the embedded preview.
      embedHeight - Height of the embedded preview.
      duration - Duration of the content, in seconds.
      author - Author of the content.
      hasLargeMedia - True, if size of media in the preview can be changed.
      showLargeMedia - True, if large media preview must be shown.
      skipConfirmation - True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
      showAboveText - True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
      animation - Preview of the content as an animation, if available; may be null.
      audio - Preview of the content as an audio file, if available; may be null.
      document - Preview of the content as a document, if available; may be null.
      sticker - Preview of the content as a sticker for small WEBP files, if available; may be null.
      video - Preview of the content as a video, if available; may be null.
      videoNote - Preview of the content as a video note, if available; may be null.
      voiceNote - Preview of the content as a voice note, if available; may be null.
      storySenderChatId - The identifier of the sender of the previewed story; 0 if none.
      storyId - The identifier of the previewed story; 0 if none.
      instantViewVersion - Version of web page instant view (currently, can be 1 or 2); 0 if none.
    • WebPage

      public WebPage(DataInput input) throws IOException
      Describes a link preview.
      Parameters:
      input - Serialized input
      Throws:
      IOException - the deserialization failed
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR
    • serialize

      public void serialize(DataOutput output) throws IOException
      Serialize the TDLib class
      Specified by:
      serialize in class TdApi.Object
      Parameters:
      output - output data stream
      Throws:
      IOException - the serialization failed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object