Add documentation for `authors` attribute in preview cards (#1512)
* Add documentation for `authors` attribute in preview cards * Add `PreviewCardAuthor` entity * Update PreviewCard.md * Update PreviewCardAuthor.md
This commit is contained in:
parent
54f7d5a63f
commit
24dd81ef49
|
@ -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}
|
||||
|
||||
|
|
|
@ -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" >}}
|
Loading…
Reference in New Issue