0% found this document useful (0 votes)
48 views

SFDC 001

This document summarizes key classes and properties used to work with feed items in the ConnectApi Apex wrapper for the Chatter REST API. It describes the ConnectApi.FeedItem class which represents a feed item, including properties like type, url, and visibility. It also describes subclasses that represent attachments like ConnectApi.FeedItemAttachment and its subclasses. The ConnectApi.FeedItemPage class is used to page through lists of feed items.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

SFDC 001

This document summarizes key classes and properties used to work with feed items in the ConnectApi Apex wrapper for the Chatter REST API. It describes the ConnectApi.FeedItem class which represents a feed item, including properties like type, url, and visibility. It also describes subclasses that represent attachments like ConnectApi.FeedItemAttachment and its subclasses. The ConnectApi.FeedItemPage class is used to page through lists of feed items.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Reference Apex Classes

Name Type Description


originalFeedItem ConnectApi. A reference to the original feed item if this feed item is a shared
Reference Class feed item, otherwise, null.
originalFeedItemActor ConnectApi.Actor If this feed item is a shared feed item, returns information about
Class the original poster of the feed item, otherwise, returns null.
parent ConnectApi.ActorWithId Feed item’s parent
Class

photoUrl String URL of the photo associated with the feed item
preamble ConnectApi. A collection of message segments, including the unformatted text
MessageBody Class of the message that you can use as the title of a feed item. Message
segments include name, link, and motif icon information for the
actor that created the feed item.
type ConnectApi. Specifies the type of feed item, such as a content post, a text post,
FeedItemType Enum and so on.
• ActivityEvent—Feed item generated when CaseFeed is
on and an event or task associated with a parent record with a
feed enabled is created or updated.
• ApprovalPost—Feed item with an approval action
attachment. Approvers can act on the feed item parent.
• AttachArticleEvent—Feed item generated when an article
is attached to a case in Case Feed.
• BasicTemplateFeedItem—Feed item with a standard
rendering containing an attachment with an image, link, and
title.
• CallLogPost—Feed item generated when a call log is saved
to a case in Case Feed.
• CaseCommentPost—Feed item generated when a case
comment is saved in Case Feed.
• ChangeStatusPost—Feed item generated when the status
of a case is changed in Case Feed.
• ChatTranscriptionPost—Feed item generated in a Case
Feed when a Live Agent chat transcript is saved to a case.
• CollaborationGroupCreated—Feed item generated when
a new group is created. Contains a link to the new group.
• CollaborationGroupUnarchived—Feed item generated
when an archived group is unarchived.
• ContentPost—Feed item with a file attachment.
• CreateRecordEvent—Feed item that describes a record
created in the publisher.
• DashboardComponentAlert—Feed item with a dashboard
alert attachment.
• DashboardComponentSnapshot—Feed item with a
dashboard snapshot attachment.
• EmailMessageEvent—Feed item generated when an email
is sent from a case in the Case Feed.
• FacebookPost—Feed item generated when an Facebook
post is created from a case in the Case Feed.

592
Reference Apex Classes

Name Type Description


• LinkPost—Feed item with a hyperlink attachment
• PollPost—Feed item with an actionable poll attachment.
Viewers of the feed item are allowed to vote on the options in
the poll.
• ReplyPost
• RypplePost—Feed item generated when a Thanks badge is
created.
• TextPost—Feed item without an attachment.
• TrackedChange—Feed item created when one or more fields
on a record have been changed.
• TwitterPost—Feed item generated when a Twitter post is
created from a case in Case Feed.
• UserStatus—
Deprecated. A user's post to their own profile.

url String Chatter REST API URL to this feed item


visibility ConnectApi. Specifies the type of users who can see a feed item.
FeedItem • AllUsers
VisibilityType • InternalUsers
Enum

ConnectApi.FeedItemAttachment Class
Child classes:
• ConnectApi.ApprovalAttachment Class
• ConnectApi.BasicTemplateAttachment Class
• ConnectApi.CaseComment Class
• ConnectApi.ContentAttachment Class
• ConnectApi.DashboardComponentAttachment Class
• ConnectApi.FeedPoll Class
• ConnectApi.LinkAttachment Class
No additional properties. All instances of this class are actually one of the child classes.
This is an abstract class.
Message segments in a feed item are typed as ConnectApi.MessageSegment. Feed item attachments are typed as
ConnectApi.FeedItemAttachment. These classes are both abstract and have several concrete subclasses. At runtime you
can use instanceof to check the concrete types of these objects and then safely proceed with the corresponding downcast.
When you downcast, you must have a default case that handles unknown subclasses.
Important: The composition of a feed may change between releases. Your code should always be prepared to handle
unknown subclasses in both ConnectApi.MessageSegment and ConnectApi.FeedItemAttachment objects.

593
Reference Apex Classes

ConnectApi.FeedItemPage Class

Name Type Description


currentPageToken String Token identifying the first page of feed items
currentPageUrl String Chatter REST API URL identifying the first page of feed items
isModifiedToken String An opaque polling token to use in the since parameter of the
ChatterFeeds.isModified method. The token describes
when the feed was last modified.
isModifiedUrl String A Chatter REST API URL with a since request parameter that
contains an opaque token that describes when the feed was last
modified. Returns null if the feed is not a news feed. Use this
URL to poll a news feed for updates.
items List<ConnectApi.FeedItem List of feed items
Class>

nextPageToken String Token identifying the next page of feed items


nextPageUrl String Chatter REST API URL identifying the next page of feed items

ConnectApi.FeedModifiedInfo Class

Name Type Description


isModified Boolean true if the news feed has been modified since the last time it was
polled; false otherwise. Returns null if the feed is not a news
feed.
isModifiedToken String An opaque polling token to use in the since parameter of the
ChatterFeeds.isModified method. The token describes
when the feed was last modified.
nextPollUrl String A Chatter REST API URL with a since request parameter that
contains an opaque token that describes when the feed was last
modified. Returns null if the feed is not a news feed. Use this
URL to poll a news feed for updates. Make a request to this URL
after requesting the URL in the Feed.isModifiedUrl or
FeedItemPage.isModifiedUrl property.

ConnectApi.FeedPoll Class
Child class of ConnectApi.FeedItemAttachment Class.
This object is returned as the attachment of FeedItems with type PollPost.

Name Type Description


choices List<ConnectApi. List of choices for poll.
FeedPollChoice
Class>

594
Reference Apex Classes

Name Type Description


myChoiceId String ID of the poll choice that the current user has voted for in this
poll. Returns null if the current user hasn’t voted.
totalVoteCount Integer Total number of votes cast on the feed poll item.

ConnectApi.FeedPollChoice Class

Name Type Description


id String Poll choice Id
position Integer The location in the poll where this poll choice exists. The first poll
choice starts at 1.
text String Label text associated with the poll choice
voteCount Integer Total number of votes for this poll choice
voteCountRatio Double The ratio of total number of votes for this poll choice to all votes
cast in the poll. Multiply the ratio by 100 to get the percentage of
votes cast for this poll choice.

ConnectApi.FieldChangeSegment Class
Child class of ConnectApi.ComplexSegment Class
No additional properties.

ConnectApi.FieldChangeNameSegment Class
Child class of ConnectApi.MessageSegment Class
No additional properties.

ConnectApi.FieldChangeValueSegment Class
Child class of ConnectApi.MessageSegment Class

Name Type Description


url String URL value if the field change is to a URL field (such as a web
address)

ConnectApi.FileSummary Class
Child class of ConnectApi.ActorWithId Class

Name Type Description


checksum String MD5 checksum for the file
contentSize Integer Size of the file in bytes
contentUrl String If the file is a link, returns the URL, otherwise, the string “null”

595
Reference Apex Classes

Name Type Description


description String Description of the file
downloadUrl String URL to the file, that can be used for downloading the file
fileExtension String Extension of the file
fileType String Type of file, such as PDF, PowerPoint, and so on
flashRenditionStatus String Specifies if a flash preview version of the file has been rendered
isInMyFileSync Boolean Reserved for future use
mimeType String File’s MIME type
modifiedDate Datetime ISO8601 date string, for example, 2011-02-25T18:24:31.000Z
origin String Specifies the file source. Valid values are:
• Chatter—file came from Chatter
• Content—file came from content

owner ConnectApi.User File’s owner


Summary Class

pdfRenditionStatus String Specifies if a PDF preview version of the file has been rendered
renditionUrl String URL to the rendition for the file
thumb120By90RenditionStatus String Specifies if a 120x90–pixel–sized preview image of the file has
been rendered
thumb240By180RenditionStatus String Specifies if a 240x180–pixel–sized preview image of the file has
been rendered
thumb720By480RenditionStatus String Specifies if a 720x480–pixel–sized preview image of the file has
been rendered
title String Title of the file
versionNumber String File’s version number

ConnectApi.FollowerPage Class

Name Type Description


currentPageUrl String Chatter REST API URL identifying the current page
followers List<ConnectApi. List of subscriptions
Subscription
Class>

nextPageUrl String Chatter REST API URL identifying the next page
previousPageUrl String Chatter REST API URL identifying the previous page
total Integer Total number of followers across all pages

596

You might also like