LinksResource class
Methods for the /api/links and related endpoints.
Constructors
- LinksResource(ShrtnrBaseClient _http)
-
Creates a links resource backed by
_http.
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
-
analytics(
int id, {TimelineRange? range}) → Future< ClickStats> -
Get click analytics for a link. Optional
rangescopes the window. -
breakdown(
int id, {required BreakdownDimension dimension, TimelineRange? range, int? offset, int? limit}) → Future< BreakdownPage> -
Page through a single analytics
dimensionfor a link. -
bundles(
int id) → Future< List< Bundle> > - List bundles that contain this link.
-
create(
{required String url, String? label, int? slugLength, int? expiresAt, bool? allowDuplicate}) → Future< Link> - Create a new short link.
-
delete(
int id) → Future< DeletedResult> - Permanently delete a link.
-
disable(
int id) → Future< Link> - Disable a link so it stops redirecting.
-
enable(
int id) → Future< Link> - Re-enable a disabled link.
-
get(
int id, {TimelineRange? range}) → Future< Link> -
Get a link by ID. Optional
rangescopes the click count to a time window. -
list(
{String? owner, TimelineRange? range}) → Future< List< Link> > -
List all links. Filter by
owneridentity or click-countrange. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
qr(
int id, {String? slug, int? size}) → Future< String> - Get QR code SVG for a link. Returns the SVG string.
-
timeline(
int id, {TimelineRange? range}) → Future< TimelineData> -
Get click timeline for a link. Optional
rangescopes the window. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Link link) → Future< Link> -
Update a link with the values held by
link.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited