app.bsky.richtext.facet¶

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

field py_type: Literal['app.bsky.richtext.facet#byteSlice'] = 'app.bsky.richtext.facet#byteSlice'¶

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 py_type: Literal['app.bsky.richtext.facet#link'] = 'app.bsky.richtext.facet#link'¶
field uri: str [Required]¶

Uri.

Constraints:
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] [Required]¶
field index: models.AppBskyRichtextFacet.ByteSlice [Required]¶

Index.

field py_type: Literal['app.bsky.richtext.facet'] = 'app.bsky.richtext.facet'¶
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: str [Required]¶

Did.

Constraints:
field py_type: Literal['app.bsky.richtext.facet#mention'] = 'app.bsky.richtext.facet#mention'¶
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 py_type: Literal['app.bsky.richtext.facet#tag'] = 'app.bsky.richtext.facet#tag'¶
field tag: str [Required]¶

Tag.

Constraints:
  • max_length = 640