Package org.drinkless.tdlib

# Class TdApi.GetLinkPreview

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.LinkPreview>
org.drinkless.tdlib.TdApi.GetLinkPreview

Enclosing class:
  TdApi

public static class TdApi.GetLinkPreview extends TdApi.Function<TdApi.LinkPreview>
Returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.

Returns `LinkPreview`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.LinkPreviewOptions`
  `linkPreviewOptions`
  Options to be used for generation of the link preview; pass null to use default link preview options.
  `TdApi.FormattedText`
  `text`
  Message text with formatting.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetLinkPreview()`
  Default constructor for a function, which returns a link preview by the text of a message.
  `GetLinkPreview(TdApi.FormattedText text, TdApi.LinkPreviewOptions linkPreviewOptions)`
  Creates a function, which returns a link preview by the text of a message.

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

  `toString`

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

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

- ## Field Details

  - ### text

    public TdApi.FormattedText text
    Message text with formatting.

  - ### linkPreviewOptions

    public TdApi.LinkPreviewOptions linkPreviewOptions
    Options to be used for generation of the link preview; pass null to use default link preview options.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### GetLinkPreview

    public GetLinkPreview()
    Default constructor for a function, which returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.

    Returns `LinkPreview`

  - ### GetLinkPreview

    public GetLinkPreview(TdApi.FormattedText text, TdApi.LinkPreviewOptions linkPreviewOptions)
    Creates a function, which returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.

    Returns `LinkPreview`

    Parameters:
      `text` - Message text with formatting.
      `linkPreviewOptions` - Options to be used for generation of the link preview; pass null to use default link preview options.

- ## 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.Function<TdApi.LinkPreview>`
    Returns:
      this.CONSTRUCTOR