Package org.drinkless.tdlib

# Class TdApi.LinkPreview

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.LinkPreview

Enclosing class:
  `TdApi`

public static class TdApi.LinkPreview extends TdApi.Object
Describes a link preview.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `String`
  `author`
  Author of the content.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.FormattedText`
  `description`
  Description of the content.
  `String`
  `displayUrl`
  URL to display.
  `boolean`
  `hasLargeMedia`
  True, if size of media in the preview can be changed.
  `int`
  `instantViewVersion`
  Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
  `boolean`
  `showAboveText`
  True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
  `boolean`
  `showLargeMedia`
  True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
  `boolean`
  `showMediaAboveDescription`
  True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
  `String`
  `siteName`
  Short name of the site (e.g., Google Docs, App Store).
  `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.
  `String`
  `title`
  Title of the content.
  `TdApi.LinkPreviewType`
  `type`
  Type of the link preview.
  `String`
  `url`
  Original URL of the link.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LinkPreview()`
  Describes a link preview.
  `LinkPreview(String url, String displayUrl, String siteName, String title, TdApi.FormattedText description, String author, TdApi.LinkPreviewType type, boolean hasLargeMedia, boolean showLargeMedia, boolean showMediaAboveDescription, boolean skipConfirmation, boolean showAboveText, int instantViewVersion)`
  Describes a link preview.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### url

    public String url
    Original URL of the link.

  - ### displayUrl

    public String displayUrl
    URL to display.

  - ### 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.

  - ### author

    public String author
    Author of the content.

  - ### type

    public TdApi.LinkPreviewType type
    Type of the link preview.

  - ### 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; otherwise, the media preview must be shown small and only the first frame must be shown for videos.

  - ### showMediaAboveDescription

    public boolean showMediaAboveDescription
    True, if media must be shown above link preview description; otherwise, the media must be shown below the description.

  - ### 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.

  - ### instantViewVersion

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

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### LinkPreview

    public LinkPreview()
    Describes a link preview.

  - ### LinkPreview

    public LinkPreview(String url, String displayUrl, String siteName, String title, TdApi.FormattedText description, String author, TdApi.LinkPreviewType type, boolean hasLargeMedia, boolean showLargeMedia, boolean showMediaAboveDescription, boolean skipConfirmation, boolean showAboveText, int instantViewVersion)
    Describes a link preview.
    Parameters:
      `url` - Original URL of the link.
      `displayUrl` - URL to display.
      `siteName` - Short name of the site (e.g., Google Docs, App Store).
      `title` - Title of the content.
      `description` - Description of the content.
      `author` - Author of the content.
      `type` - Type of the link preview.
      `hasLargeMedia` - True, if size of media in the preview can be changed.
      `showLargeMedia` - True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
      `showMediaAboveDescription` - True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
      `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.
      `instantViewVersion` - Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.

- ## 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