Class PostStory

java.lang.Object
io.github.natanimn.telebof.requests.AbstractBaseRequest<PostStory, Story>
io.github.natanimn.telebof.requests.service.PostStory

public class PostStory extends AbstractBaseRequest<PostStory, Story>
PostStory class. Returns Story on success.
Since:
19 August 2025
See Also:
  • Constructor Details

    • PostStory

      public PostStory(String business_connection_id, InputStoryContent content, Integer active_period, Api api)
      Required
      Parameters:
      business_connection_id - Unique identifier of the business connection
      content - Content of the story
      active_period - Period after which the story is moved to the archive, in seconds
      api - api
  • Method Details

    • caption

      public PostStory caption(String caption)
      Optional
      Parameters:
      caption - Caption of the story, 0-2048 characters after entities parsing
      Returns:
      PostStory
    • parseMode

      public PostStory parseMode(ParseMode parse_mode)
      Optional
      Parameters:
      parse_mode - Mode for parsing entities in the story caption
      Returns:
      PostStory
    • captionEntities

      public PostStory captionEntities(MessageEntity[] caption_entities)
      Optional
      Parameters:
      caption_entities - A JSON-serialized list of special entities that appear in the caption, which can be specified instead of
      invalid reference
      #parseMmode
      Returns:
      PostStory
    • areas

      public PostStory areas(StoryArea[] areas)
      Optional
      Parameters:
      areas - A JSON-serialized list of clickable areas to be shown on the story
      Returns:
      PostStory
    • postToChatPage

      public PostStory postToChatPage(boolean post_to_chat_page)
      Optional
      Parameters:
      post_to_chat_page - Pass True to keep the story accessible after it expires
      Returns:
      PostStory
    • protectContent

      public PostStory protectContent(boolean protect_content)
      Optional
      Parameters:
      protect_content - Pass True if the content of the story must be protected from forwarding and screenshotting
      Returns:
      PostStory