ReactionsClient class
Provides methods for reacting to Activities.
Reactions are a special kind of data that can be used to capture user interaction with specific activities.
Common examples of reactions are likes, comments, and upvotes.
Reactions are automatically returned to feeds' activities at read time when the reactions parameters are used.
Constructors
- ReactionsClient(ReactionsAPI _reactions, {Token? userToken, String? secret})
-
Initialize a reaction client
const
Properties
Methods
-
add(
String kind, String activityId, {String? userId, Map< String, Object> ? data, List<FeedId> ? targetFeeds}) → Future<Reaction> - Add reaction
-
addChild(
String kind, String parentId, {String? userId, Map< String, Object> ? data, List<FeedId> ? targetFeeds}) → Future<Reaction> - A reaction can also be added to another reaction; in this case, a child reaction is created. Child reactions are created in the same way as regular reactions but have a few crucial differences:
-
delete(
String id) → Future< void> - Delete reaction
-
filter(
LookupAttribute lookupAttr, String lookupValue, {Filter? filter, EnrichmentFlags? flags, int? limit, String? kind}) → Future< List< Reaction> > - You can read reactions and filter them based on their user_id or activity_id values. Further filtering can be done with the kind parameter (e.g. retrieve all likes by one user, retrieve all comments for one activity, etc.).
-
get(
String id) → Future< Reaction> - Get reaction retrieving-reactions
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paginatedFilter<
A, Ob, T, Or> (LookupAttribute lookupAttr, String lookupValue, {Filter? filter, EnrichmentFlags? flags, int? limit, String? kind}) → Future< PaginatedReactions< A, Ob, T, Or> > - Paginated reactions and filter them
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String reactionId, {Map< String, Object> ? data, List<FeedId> ? targetFeeds}) → Future<Reaction> - Reactions can be updated by providing the reaction ID parameter.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited