ContentElementGqlRepository class Null safety

Constructors

ContentElementGqlRepository(GraphQLClient graphQLClient, Logger? logger)

Properties

contentElementUpdateStream Stream<BuiltList<StreamUpdate<ContentElement>>>
read-only
graphQLClient GraphQLClient
final
hashCode int
The hash code for this object.
read-onlyinherited
logger Logger?
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

getContentElements({required int offset, required int limit, required LocalizedType<Language>? language, required ContentElementType type, BuiltSet<User>? likedByUsers, required BuiltSet<LocalizedType<Interest>> applicableInterests, required BuiltSet<LocalizedType<Condition>> applicableConditions}) Future<BuiltList<ContentElement>>
Retrieves content elements for a user. Same behaviour as getRelevantContent but without random seed, always returns the same order. The parameter getOnlyFavorites indicates if only should return content elements liked by the user
getRelevantContent({double randomSeed = 0, required int offset, required int limit, required LocalizedType<Language>? language, required ContentElementType type, BuiltSet<User>? likedByUsers, required BuiltSet<LocalizedType<Interest>> applicableInterests, required BuiltSet<LocalizedType<Condition>> applicableConditions}) Future<BuiltList<ContentElement>>
Retrieves relevant content for a user. Filters content elements by likes if likedByUsers is not empty and by type. The random seed is used to randomize elements returned by the backend. Specifying the same random seed between calls ensures that the same order is maintained between pages. Uses offset and limit for pagination. Uses type for filtering the content elements to retrieve.
getUsedApplicableInterestsForContentType({ContentElementType? type, required LocalizedType<Language>? language}) Future<BuiltSet<LocalizedType<Interest>>>
Retrieves the list of used interest entities. NOTE: When specifying no locale, the defaultValue of the returned LocalizedType will be the default locale. However, when specifying a locale, the defaultValue of the returned LocalizedType will match the requested locale. All localizations will still be available, but it is important to note that the defaultValue depends on the requested locale.
like({required ContentElement content}) Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unlike({required ContentElement content}) Future<bool>

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

emptyContentElement() ContentElement