UpdatifyService class
Client for the Updatify API.
Create one directly, optionally supplying your own http.Client (useful for
testing or custom networking configuration):
final service = UpdatifyService();
final posts = await service.fetchPosts(projectId);
service.dispose();
Constructors
- UpdatifyService({Client? client})
- Creates an UpdatifyService.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
countUpdatesSince(
String projectId, DateTime since) → Future< int> -
Returns the number of published updates for
projectIdcreated aftersince. -
dispose(
) → void -
Releases the underlying
http.Clientif it was created by this instance. -
fetchPosts(
String projectId) → Future< List< UpdatifyPost> > -
Fetches just the list of updates for
projectId. -
fetchUpdates(
String projectId) → Future< UpdatifyUpdates> -
Fetches the updates for
projectIdtogether with the projectconfig(voting toggle, widget title). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
trackUpdateView(
{required String projectId, required String updateId, required String trackingTargetId}) → Future< void> -
Reports that the update
updateIdwas viewed bytrackingTargetId. -
vote(
{required String projectId, required String updateId, required String trackingTargetId, required VoteType reaction}) → Future< VoteType?> -
Casts
reactionon the updateupdateIdon behalf oftrackingTargetId.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited