Linkhut.Links.UrlAggregate (linkhut v0.1.4)

View Source

Aggregate queries about a URL's public bookmarks across all users.

These queries intentionally include unconfirmed users. The URL detail page answers "how many people saved this URL?" — the truthful answer includes everyone who actually saved it. Unconfirmed users are only excluded from discovery views (recent/2, popular/2) to prevent spam.

Summary

Functions

Returns aggregate metadata for a URL's public bookmarks.

Functions

url_detail(url, opts)

@spec url_detail(
  String.t(),
  keyword()
) :: Linkhut.Links.UrlDetail.t() | nil

Returns aggregate metadata for a URL's public bookmarks.

Returns nil if no public bookmarks exist for this URL.

Options

  • :current_user_id - include the current user's bookmark (even if private/unread) in the result