Bonfire.API.MastoCompat.Mappers.Tag (Bonfire v1.0.1-social-alpha.28)

View Source

Maps Bonfire Hashtag objects to Mastodon Tag format.

Per the Mastodon API spec, a Tag represents a hashtag used within a status.

Required Fields

  • name (string) - The hashtag name (without #)
  • url (string, uri) - URL to the hashtag timeline

Optional Fields

  • history (array) - Usage statistics (empty array - not implemented)
  • following (boolean) - Whether the authenticated user is following this hashtag

Summary

Functions

Transform a Bonfire Hashtag to a Mastodon Tag.

Functions

from_hashtag(hashtag, opts \\ [])

Transform a Bonfire Hashtag to a Mastodon Tag.

Options

  • :following - Whether the current user is following this hashtag (default: false)