diff --git a/content/en/entities/PreviewCard.md b/content/en/entities/PreviewCard.md index 1a1f276..27c4861 100644 --- a/content/en/entities/PreviewCard.md +++ b/content/en/entities/PreviewCard.md @@ -68,6 +68,7 @@ aliases: [ "title": "‘I lost my £193,000 inheritance – with one wrong digit on my sort code’", "description": "When Peter Teich’s money went to another Barclays customer, the bank offered £25 as a token gesture", "type": "link", + "authors": [], "author_name": "", "author_url": "", "provider_name": "", @@ -115,19 +116,28 @@ aliases: [ **Version history:**\ 1.3.0 - added +### `authors` {#authors} + +**Description:** Fediverse account of the authors of the original resource.\ +**Type:** Array of [PreviewCardAuthor]({{< relref "entities/PreviewCardAuthor">}})\ +**Version history:**\ +4.3.0 - added + ### `author_name` {#author_name} -**Description:** The author of the original resource.\ +**Description:** The author of the original resource. Deprecated since 4.3.0, clients should use `authors` instead.\ **Type:** String\ **Version history:**\ -1.3.0 - added +1.3.0 - added\ +4.3.0 - deprecated ### `author_url` {#author_url} -**Description:** A link to the author of the original resource.\ +**Description:** A link to the author of the original resource. Deprecated since 4.3.0, clients should use `authors` instead.\ **Type:** String (URL)\ **Version history:**\ -1.3.0 - added +1.3.0 - added\ +4.3.0 - deprecated ### `provider_name` {#provider_name} @@ -279,4 +289,4 @@ aliases: [ {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/trends/link_serializer.rb" caption="app/serializers/rest/trends/link_serializer.rb" >}} -{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/models/trends/links.rb" caption="app/models/trends/links.rb" >}} \ No newline at end of file +{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/models/trends/links.rb" caption="app/models/trends/links.rb" >}} diff --git a/content/en/entities/PreviewCardAuthor.md b/content/en/entities/PreviewCardAuthor.md new file mode 100644 index 0000000..60d8641 --- /dev/null +++ b/content/en/entities/PreviewCardAuthor.md @@ -0,0 +1,39 @@ +--- +title: PreviewCardAuthor +description: Represents an author in a rich preview card. +menu: + docs: + parent: entities +aliases: [ + "/entities/PreviewCardAuthor", +] +--- + +## Attributes + +### `name` {#name} + +**Description:** The original resource author's name. Replaces the deprecated `author_name` attribute of the preview card.\ +**Type:** String\ +**Version history:**\ +4.3.0 - added + +### `url` {#url} + +**Description:** A link to the author of the original resource. Replaces the deprecated `author_url` attribute of the preview card.\ +**Type:** String (URL)\ +**Version history:**\ +4.3.0 - added + +### `account` {{%nullable%}} {#account} + +**Description:** The fediverse account of the author.\ +**Type:** [Account]({{< relref "entities/Account">}})\ +**Version history:**\ +4.3.0 - added + +## See also + +{{< page-relref ref="entities/PreviewCard#authors" caption="PreviewCard (`authors` attribute)" >}} + +{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/preview_card_serializer.rb" caption="app/serializers/rest/preview_card_serializer.rb" >}}