You are on page 1of 5

Reference Apex Classes

ConnectApi.FollowingCounts Class

Name Type Description


people Integer Number of people user is following
records Integer Number of records user is following
total Integer Total number of items user is following

ConnectApi.FollowingPage Class

Name Type Description


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

nextPageUrl String Chatter REST API URL of the next page


previousPageUrl String Chatter REST API URL of the previous page
total Integer Total number of records being followed across all pages

ConnectApi.GlobalInfluence Class

Name Type Description


percentile String Percentile value for the user’s influence rank within the
organization or community
rank Integer Number indicating the user’s influence rank, relative to all other
users within the organization or community

ConnectApi.GroupChatterSettings Class
A user’s Chatter settings for a specific group.

Name Type Description


emailFrequency ConnectApi. The frequency with which a group member receives email from a
GroupEmail group.
Frequency Enum

ConnectApi.GroupInformation Class
Describes the “Information” section of the group. In the Web UI, this section is above the “Description” section. If the group
is private, this section is visible only to members.

Name Type Description


text String The text of the “Information” section of the group.

597
Reference Apex Classes

Name Type Description


title String The title of the “Information” section of the group.

ConnectApi.GroupMember Class

Name Type Description


id String User’s 18–character Id
role ConnectApi. Specifies the type of membership the user has with the group, such
GroupMembership as group owner, manager, or member.
Type Enum • GroupOwner
• GroupManager
• NotAMember
• NotAMemberPrivateRequested
• StandardMember

url String Chatter REST API URL to this membership


user ConnectApi.User Information about the user who is subscribed to this group
Summary Class

ConnectApi.GroupMemberPage Class

Name Type Description


currentPageUrl String Chatter REST API URL to this page of members
members List<ConnectApi. List of group members
GroupMember
Class>

myMembership ConnectApi. If the context user is a member of this group, returns information
Reference Class about that membership, otherwise, null.
nextPageUrl String Chatter REST API URL identifying the next page of members
previousPageUrl String Chatter REST API URL identifying the previous page of members
totalMemberCount Integer Total number of group members across all pages

ConnectApi.GroupMembershipRequest Class

Name Type Description


createdDate Datetime ISO8601 date string, for example, 2011-02-25T18:24:31.000Z
id String ID for the group membership request object
lastUpdateDate Datetime ISO8601 date string, for example, 2011-02-25T18:24:31.000Z
requestedGroup ConnectApi. Information about the group the context user is requesting to join.
Reference Class

598
Reference Apex Classes

Name Type Description


responseMessage String A message for the user if their membership request is declined.
The value of this property is used only when the value of the
status property is Declined.
The maximum length is 756 characters.

status ConnectApi. The status of a request to join a private group. Values are:
GroupMembership • Accepted
RequestStatus • Declined
Enum • Pending

url String URL of the group membership request object.


user ConnectApi.User Information about the user requesting membership in a group.
Summary Class

ConnectApi.GroupMembershipRequests Class

Name Type Description


requests List<ConnectApi. Information about group membership requests.
GroupMembership
Request Class>

total Integer The total number of requests.

ConnectApi.HashtagSegment Class
Child class of ConnectApi.MessageSegment Class

Name Type Description


tag String Text of the topic without the hash symbol (#)
topicUrl String Chatter REST API Topics resource that searches for the topic:

/services/data/v28.0/chatter
/topics?exactMatch=true&q=topic

url String Chatter REST API Feed Items resource URL that searches for
the topic in all feed items in an organization:

/services/data/v28.0/chatter/feed-items?q=topic

ConnectApi.Icon Class

Property Type Description


height Integer The height of the icon in pixels.

599
Reference Apex Classes

Property Type Description


width Integer The width of the icon in pixels.
url String The URL of the icon. This URL is available to unauthenticated
users. This URL does not expire.

ConnectApi.LinkAttachment Class
Child class of ConnectApi.FeedItemAttachment Class

Name Type Description


title String Title given to the link if available, otherwise, null
url String The link URL

ConnectApi.LinkSegment Class
Child class of ConnectApi.MessageSegment Class

Name Type Description


url String The link URL

ConnectApi.MentionSegment Class
Child class of ConnectApi.MessageSegment Class

Name Type Description


accessible Boolean Specifies whether the mentioned user can see mention when it is
posted: true if the mentioned user can see the post, otherwise,
false.

name String Name of the user mentioned


user ConnectApi.User Information about the mentioned user
Summary Class

ConnectApi.MessageBody Class
Child class of ConnectApi.AbstractMessageBody Class.
No additional properties.

ConnectApi.MessageSegment Class
Superclass for:
• ConnectApi.ComplexSegment Class
• ConnectApi.EntityLinkSegment Class
• ConnectApi.FieldChangeSegment Class
• ConnectApi.FieldChangeNameSegment Class

600
Reference Apex Classes

• ConnectApi.FieldChangeValueSegment Class
• ConnectApi.HashtagSegment Class
• ConnectApi.LinkSegment Class
• ConnectApi.MentionSegment Class
• ConnectApi.MoreChangesSegment Class
• ConnectApi.ResourceLinkSegment Class
• ConnectApi.TextSegment Class
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.

Name Type Description


text String Formatted text of the message.
type ConnectApi. Textual summary of the message segment. The values correspond
MessageSegmentType to the different child classes. Value are:
Enum • ConnectApi.EntityLinkSegment Class
• ConnectApi.FieldChangeSegment Class
• ConnectApi.FieldChangeNameSegment Class
• ConnectApi.FieldChangeValueSegment Class
• ConnectApi.HashtagSegment Class
• ConnectApi.LinkSegment Class
• ConnectApi.MentionSegment Class
• ConnectApi.MoreChangesSegment Class
• ConnectApi.ResourceLinkSegment Class
• ConnectApi.TextSegment Class

ConnectApi.MoreChangesSegment Class
Child class of ConnectApi.MessageSegment Class
In feed items with a large number of tracked changes, the message is formatted as: “changed A, B, and made X more changes.”
The MoreChangesSegment contains the “X more changes.”

Name Type Description


moreChangesCount Integer Number of additional changes

ConnectApi.Motif
Each property in the motif class contains a URL to a small, medium, and large icon that indicates the Salesforce record type.
Common record types in Chatter are files, users, and groups, but all record types have a set of motif icons. Custom object

601

You might also like