BlazeDataSourceType - iOS
Represents the source of data for a specific content request.
| Value | Associated Values | Description |
|---|---|---|
| .labels |
| Represents a data source using BlazeWidgetLabel. It can include additional parameters to specify the priority of labels, the order type, the maximum number of items, and optional BlazeDataSourcePersonalizedType filtering. |
| .ids | - ids: [String]
| Represents a data source using an array of string identifiers. It allows specifying the order type for the data source. |
.recommendations
| BlazeRecommendationsType | Represents a data source using a type of BlazeRecommendationsType. |
| .search | searchText: String (required) maxItems: Int?labels: BlazeWidgetLabel? | A case for searching content using free text search. Use this to find content based on any search term without needing predefined labels. Example: let dataSource: BlazeDataSourceType = .search(searchText: "barcelona", maxItems: 20, labels: .mustInclude("football", "highlights")) |
| .composite | dataSources: [BlazeCompositeDataSourceEntry] (required) | Combines multiple independent data sources into a single deduplicated feed. See BlazeDataSourceType.composite for details. |
| .followedEntities |
| Shows content about the players, teams, and properties the user follows, based on the follow state in Blaze.shared.followEntitiesManager. If the user follows nothing, no content is returned. See Followed entities data source. |
To load layout and data source from Experiences CMS, set widgetRemoteIdentifier when you initialize the widget. That path is not a BlazeDataSourceType case. See CMS-configured widgets.
| Values | Behavior |
|---|---|
LabelsPriority | When provided, it defines the priority of labels in an array, determining the order of content (story) sorting. |
OrderType | Functions based on the presence of LabelsPriority. |
| advancedOrderType | When used with orderType, it enables primary and secondary content (story) ordering. For example, to get live stories listed first. |
WithoutLabelsPriority | Content is sorted based on the requested order. The default OrderType depends on the label filter expression. |
With LabelsPriority | Content is ordered according to the specified priority, and OrderType is used for sorting within the same priority level. |
.ids | The ‘Manual’ OrderType ensures content is received in the order specified in the Ids array. |
MaxItems | The MaxItems to fetch. |
BlazeRecommendationsType | Fetches recommendations based on the specified BlazeRecommendationsType. The behavior and sorting of the recommendations depend on the specific recommendation type used. |
BlazeDataSourcePersonalizedType | When provided, filters content using the given BlazeDataSourcePersonalizedType (IDs or labels). Not the same as Concepts personalization; see Content recommendations. |
Followed entities data source
Use .followedEntities to build a feed from the entities the user follows. The SDK reads the follow state from Blaze.shared.followEntitiesManager, so there is nothing to pass besides the optional filters. See Follow entities.
// Moments about the teams and players the user follows
let dataSource: BlazeDataSourceType = .followedEntities(
entityTypes: [.team, .player],
orderType: .recentlyUpdatedFirst,
maxItems: 20
)- An empty
entityTypesset (the default) includes all categories. - Widgets don't refresh when the user follows or unfollows. Reload them to show the change.
- It can be used as an entry in a composite data source.
Limitations
- The ‘Manual’
OrderTypeis not supported when using theLabelsPriorityparameter. BlazeDataSourcePersonalizedTypeis currently supported only for the stories
Updated about 9 hours ago
