GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeDataSourceType - Android

Represents the source of data for a specific content request.

ValuesBehavior
labelsPriorityWhen provided, it defines the priority of labels in an array, determining the order of content sorting.
orderTypeFunctions based on the presence of labelsPriority.
advancedOrderTypeWhen used with orderType, it enables primary and secondary content ordering.
WithoutlabelsPriorityContent is sorted based on the requested order. The default orderType depends on the label filter expression.
With labelsPriorityContent is ordered according to the specified priority, and orderType is used for sorting within the same priority level.
idsThe ‘Manual’ orderType ensures content is received in the order specified in the ID array.
maxItemsThe maxItems to fetch.
BlazeRecommendationsTypeFetches recommendations based on the specified BlazeRecommendationsType . The behavior and sorting of the recommendations depend on the specific recommendation type used.
personalizedTypeWhen provided, filters content using BlazeDataSourcePersonalizedType (IDs or labels for specific players, teams, or label expressions). Not the same as Concepts personalization; see Content recommendations.
ValueAssociated valuesDescription
Labels
  • blazeWidgetLabel: IBlazeWidgetLabelExpression
    (required)
Represents a data source using IBlazeWidgetLabelExpression.
It can include additional parameters to specify the priority of labels, the order type, and the maximum number of items.
IDs
  • ids: List<String>
    (required)
Represents a data source with a list of string identifiers. It also allows specifying the order type.
Recommendations
  • note_: This feature is in Beta. Contact us to use it
type: BlazeRecommendationsTypeRepresents a data source using a type of BlazeRecommendationsType.
SearchsearchText: String
(required)
maxItems: Int?
blazeWidgetLabel: BlazeWidgetLabel?
A case for searching content using free text search. Use this to find content based on any search term without needing predefined labels.
searchText: The search term to find relevant content.
blazeWidgetLabel: (Optional) a label expression filter used to scope search results to a labeled subset of content, for example, A AND B, A OR B, or A AND (B OR C).
Search supports only searchText, optional maxItems, and an optional label expression filter. Search does not support label priority or ordering.
CompositedataSources: List<BlazeCompositeDataSourceEntry>
(required)
Combines multiple independent data sources into a single deduplicated feed. See BlazeDataSourceType.Composite for details.
FollowedEntities
  • entityTypes: Set<BlazeFollowedEntityCategory>
    Restricts content to these entity categories (PLAYER, TEAM, PROPERTY). Empty by default, which means all categories.
  • orderType: BlazeOrderType?
    Defines how content should be ordered.
  • advancedOrderType: BlazeAdvancedOrderType?
    Use to set prioritization of content sorting in combination with orderType. Applies to Stories and Videos; Moments ignore it.
  • maxItems: Int?
    The maximum number of items to be fetched.
Shows content about the players, teams, and properties the user follows, based on the follow state in BlazeSDK.followEntitiesManager. If the user follows nothing, no content is returned. See Followed entities data source.

Followed entities data source

Use FollowedEntities to build a feed from the entities the user follows. The SDK reads the follow state from BlazeSDK.followEntitiesManager, so there is nothing to pass besides the optional filters. See IBlazeFollowEntitiesManager.

// Moments about the teams and players the user follows
val dataSource = BlazeDataSourceType.FollowedEntities(
    entityTypes = setOf(BlazeFollowedEntityCategory.TEAM, BlazeFollowedEntityCategory.PLAYER),
    orderType = BlazeOrderType.RECENTLY_UPDATED_FIRST,
    maxItems = 20
)
  • An empty entityTypes set (the default) includes all categories.
  • Widgets and containers 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.

To load layout and data source from Experiences CMS, set widgetRemoteIdentifier when you initialize the widget. That path is not a BlazeDataSourceType value. See CMS-configured widgets.


Did this page help you?