Post#

Whenever you're dealing with a post in your template, you're actually working with a Post object. As each provider returns different content, some attributes will return different content. However, the purpose of a Post object is to normalize the content from a provider.

You can access the raw content fetched from a provider's API using the data attribute.

Attributes#

AttributeDescription
idThe ID of the post.
uidThe unique or secondary identifer.
textThe main text for the post.
urlThe URL to the post on the provider site.
sourceIdThe ID for the Source.
sourceHandleThe handle for the Source.
sourceTypeThe type of Source.
postTypeThe type of post this is classified as.
likesThe number of likes this post has received.
sharesThe number of shares this post has received.
repliesThe number of replies this post has received.
authorThe Post Author.
tagsA collection of tags or hashtags for the post.
linksA collection of Post Link objects.
imagesA collection of Post Media objects.
videosA collection of Post Media objects.
dataA full response from the social media provider.
metaAny additional content for the post type for easy-access.

Methods#

MethodDescription
getSource()Returns the source this post was made from.
getContent()Returns text or message as the main content of the post.
hasMedia()Whether or not a post contains an image or video.
getAuthorImage()Returns the author's profile image (if one exists).
getImage()Returns the first image (typically the primary image) for the post.
getVideo()Returns the first video (typically the primary video) for the post.
getFriendlyDate(date)Returns a "friendly" representation of a date (e.g. 5.2M).
getProviderColorThe primary brand color of the provider connected.
getProviderIconThe SVG icon of the source provider connected.

Post Author#

Attributes#

AttributeDescription
idThe ID of the author.
usernameThe username of the author.
nameThe name of the author.
urlThe url of the author.
photoThe photo of the author.

Post Media#

A media item represents either a video or an image.

Attributes#

AttributeDescription
idThe ID of the media item.
titleThe title of the media item.
typeThe type of media item (video or image).
urlThe url of the media item.
widthThe width of the media item.
heightThe height of the media item.

Post Link#

Attributes#

AttributeDescription
idThe ID of the link.
titleThe title of the link.
urlThe ID of the link.

Previous ← Source Provider Next Events →