Hunter.Card (hunter v0.7.0)

Copy Markdown View Source

Card entity

This module defines a Hunter.Card struct representing a preview card for links included in a status, embedded in Hunter.Status

Fields

  • url- the url associated with the card
  • title - the title of the card
  • description - the card description
  • image - the image associated with the card, if any
  • type - link, photo, video, or rich
  • author_name - name of the author/owner of the resource
  • author_url - URL for the author/owner of the resource
  • provider_name - name of the resource provider
  • provider_url - url of the resource provider
  • html - HTML required to display the resource
  • width - width in pixels
  • height - height in pixels
  • blurhash - hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet
  • embed_url - used for photo embeds instead of custom html
  • authors - list of Hunter.Card.Author, fediverse authors of the resource
  • published_at - publication date as a UNIX timestamp, only present on trending links
  • history - usage statistics, only present on trending links

Summary

Types

t()

@type t() :: %Hunter.Card{
  author_name: String.t(),
  author_url: String.t(),
  authors: [Hunter.Card.Author.t()] | nil,
  blurhash: String.t() | nil,
  description: String.t(),
  embed_url: String.t() | nil,
  height: non_neg_integer(),
  history: [map()] | nil,
  html: String.t(),
  image: String.t(),
  provider_name: String.t(),
  provider_url: String.t(),
  published_at: String.t() | nil,
  title: String.t(),
  type: String.t(),
  url: String.t(),
  width: non_neg_integer()
}