app.bsky.richtext.facet

Annotation of a sub-string within rich text.

class atproto_client.models.app.bsky.richtext.facet.Main

Bases: ModelBase

Definition model for app.bsky.richtext.facet. Annotation of a sub-string within rich text.

field features: List[models.AppBskyRichtextFacet.Mention | models.AppBskyRichtextFacet.Link | models.AppBskyRichtextFacet.Tag | DotDict] [Required]

Features.

field index: models.AppBskyRichtextFacet.ByteSlice [Required]

Index.

class atproto_client.models.app.bsky.richtext.facet.Mention

Bases: ModelBase

Definition model for app.bsky.richtext.facet. Facet feature for mention of another account. The text is usually a handle, including a β€˜@’ prefix, but the facet reference is a DID.

field did: Did [Required]

Did.

Bases: ModelBase

Definition model for app.bsky.richtext.facet. Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.

field uri: Uri [Required]

Uri.

class atproto_client.models.app.bsky.richtext.facet.Tag

Bases: ModelBase

Definition model for app.bsky.richtext.facet. Facet feature for a hashtag. The text usually includes a β€˜#’ prefix, but the facet reference should not (except in the case of β€˜double hash tags’).

field tag: str [Required]

Tag.

Constraints:
  • max_length = 640

class atproto_client.models.app.bsky.richtext.facet.ByteSlice

Bases: ModelBase

Definition model for app.bsky.richtext.facet. Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.

field byte_end: int [Required]

Byte end.

Constraints:
  • ge = 0

field byte_start: int [Required]

Byte start.

Constraints:
  • ge = 0