Package org.drinkless.tdlib

# Class TdApi.PostStory

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Story>
org.drinkless.tdlib.TdApi.PostStory

Enclosing class:
  `TdApi`

public static class TdApi.PostStory extends TdApi.Function<TdApi.Story>
Posts a new story on behalf of a chat; requires canPostStories administrator right for supergroup and channel chats. Returns a temporary story.

Returns `Story`

- ## 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
  `int`
  `activePeriod`
  Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
  `int[]`
  `albumIds`
  Identifiers of story albums to which the story will be added upon posting.
  `TdApi.InputStoryAreas`
  `areas`
  Clickable rectangle areas to be shown on the story media; pass null if none.
  `TdApi.FormattedText`
  `caption`
  Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption").
  `long`
  `chatId`
  Identifier of the chat that will post the story.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.InputStoryContent`
  `content`
  Content of the story.
  `TdApi.StoryFullId`
  `fromStoryFullId`
  Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
  `boolean`
  `isPostedToChatPage`
  Pass true to keep the story accessible after expiration.
  `TdApi.StoryPrivacySettings`
  `privacySettings`
  The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats.
  `boolean`
  `protectContent`
  Pass true if the content of the story must be protected from forwarding and screenshotting.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PostStory()`
  Default constructor for a function, which posts a new story on behalf of a chat; requires canPostStories administrator right for supergroup and channel chats.
  `PostStory(long chatId, TdApi.InputStoryContent content, TdApi.InputStoryAreas areas, TdApi.FormattedText caption, TdApi.StoryPrivacySettings privacySettings, int[] albumIds, int activePeriod, TdApi.StoryFullId fromStoryFullId, boolean isPostedToChatPage, boolean protectContent)`
  Creates a function, which posts a new story on behalf of a chat; requires canPostStories administrator right for supergroup and channel chats.

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

  - ### chatId

    public long chatId
    Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.

  - ### content

    public TdApi.InputStoryContent content
    Content of the story.

  - ### areas

    public TdApi.InputStoryAreas areas
    Clickable rectangle areas to be shown on the story media; pass null if none.

  - ### caption

    public TdApi.FormattedText caption
    Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption").

  - ### privacySettings

    public TdApi.StoryPrivacySettings privacySettings
    The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats.

  - ### albumIds

    public int[] albumIds
    Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption("story_album_size_max") stories.

  - ### activePeriod

    public int activePeriod
    Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.

  - ### fromStoryFullId

    public TdApi.StoryFullId fromStoryFullId
    Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.

  - ### isPostedToChatPage

    public boolean isPostedToChatPage
    Pass true to keep the story accessible after expiration.

  - ### protectContent

    public boolean protectContent
    Pass true if the content of the story must be protected from forwarding and screenshotting.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### PostStory

    public PostStory()
    Default constructor for a function, which posts a new story on behalf of a chat; requires canPostStories administrator right for supergroup and channel chats. Returns a temporary story.

    Returns `Story`

  - ### PostStory

    public PostStory(long chatId, TdApi.InputStoryContent content, TdApi.InputStoryAreas areas, TdApi.FormattedText caption, TdApi.StoryPrivacySettings privacySettings, int[] albumIds, int activePeriod, TdApi.StoryFullId fromStoryFullId, boolean isPostedToChatPage, boolean protectContent)
    Creates a function, which posts a new story on behalf of a chat; requires canPostStories administrator right for supergroup and channel chats. Returns a temporary story.

    Returns `Story`

    Parameters:
      `chatId` - Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
      `content` - Content of the story.
      `areas` - Clickable rectangle areas to be shown on the story media; pass null if none.
      `caption` - Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption").
      `privacySettings` - The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats.
      `albumIds` - Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption("story_album_size_max") stories.
      `activePeriod` - Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
      `fromStoryFullId` - Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
      `isPostedToChatPage` - Pass true to keep the story accessible after expiration.
      `protectContent` - Pass true if the content of the story must be protected from forwarding and screenshotting.

- ## 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.Story>`
    Returns:
      this.CONSTRUCTOR