Class NewsItemRequest


  • public final class NewsItemRequest
    extends java.lang.Object
    • Method Detail

      • getTitle

        public java.lang.String getTitle()
        Returns:
        The title of the news item.
      • getBody

        public java.util.Optional<java.lang.String> getBody()
        Returns:
        The news item body, which may contain HTML.
      • getSenderId

        public int getSenderId()
        Returns:
        The id of the sender of the news item. Must be a teammate on the workspace.
      • getState

        public java.util.Optional<NewsItemRequest.State> getState()
        Returns:
        News items will not be visible to your users in the assigned newsfeeds until they are set live.
      • getDeliverSilently

        public java.util.Optional<java.lang.Boolean> getDeliverSilently()
        Returns:
        When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.
      • getLabels

        public java.util.Optional<java.util.List<java.lang.String>> getLabels()
        Returns:
        Label names displayed to users to categorize the news item.
      • getReactions

        public java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> getReactions()
        Returns:
        Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
      • getNewsfeedAssignments

        public java.util.Optional<java.util.List<NewsfeedAssignment>> getNewsfeedAssignments()
        Returns:
        A list of newsfeed_assignments to assign to the specified newsfeed.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object