Developers

Source

Whenever you're dealing with an source in your template, you're actually working with a Source object.

Properties

name

Type: string|null

The name of the source.

handle

Type: string|null

The handle of the source.

enabled

Type: bool|null

Whether the source is enabled or not.

primaryColor

Type: string|null

The primary brand color of the provider connected.

icon

Type: string|null

The SVG icon of the source provider connected.

providerName

Type: string

The name of the source provider connected.

Methods

isConfigured()

Whether the source provider has been configured.

isConnected()

Returns: bool

Whether the source provider has been connected and has a token.

getToken()

The access token for a source provider.

getPosts(options)

Returns: array|null

Returns a collection of Post objects.