This JS API provides you access to announcements. Access methods on this object:
Returns an array of announcements by a given channel ID. The announcement object contains
userState values are
not_seen (the user hasn't seen the announcement yet) or
seen (the user skipped the tour).
titles object contains an object with all titles in all given languages. The key of this object is the ISO language identifier (i.e.
en for English).
Shows the content of the given announcement by its ID. Currently, only the modal-type announcements are supported by this API.
Shows the history modal of the given channel ID.
Attaches the newsfeed widget to a custom element. The parameter must be an HTML element instance, do not pass a CSS selector.
Listens to an event that occurs on tours. See the next section to get event names.
Data Space in pixels
Fired when the banner-type announcement is showing or closing. The argument gives you space in pixels that you can use for moving the page down if you don't want to cover your content with the Product Fruits banner.
Fired when newsfeed unread items count changed. Use this to show badge of unread items in your custom newsfeed launcher button.