mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00
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’",
|
"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",
|
"description": "When Peter Teich’s money went to another Barclays customer, the bank offered £25 as a token gesture",
|
||||||
"type": "link",
|
"type": "link",
|
||||||
|
"authors": [],
|
||||||
"author_name": "",
|
"author_name": "",
|
||||||
"author_url": "",
|
"author_url": "",
|
||||||
"provider_name": "",
|
"provider_name": "",
|
||||||
@ -115,19 +116,28 @@ aliases: [
|
|||||||
**Version history:**\
|
**Version history:**\
|
||||||
1.3.0 - added
|
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}
|
### `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\
|
**Type:** String\
|
||||||
**Version history:**\
|
**Version history:**\
|
||||||
1.3.0 - added
|
1.3.0 - added\
|
||||||
|
4.3.0 - deprecated
|
||||||
|
|
||||||
### `author_url` {#author_url}
|
### `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)\
|
**Type:** String (URL)\
|
||||||
**Version history:**\
|
**Version history:**\
|
||||||
1.3.0 - added
|
1.3.0 - added\
|
||||||
|
4.3.0 - deprecated
|
||||||
|
|
||||||
### `provider_name` {#provider_name}
|
### `provider_name` {#provider_name}
|
||||||
|
|
||||||
|
39
content/en/entities/PreviewCardAuthor.md
Normal file
39
content/en/entities/PreviewCardAuthor.md
Normal file
@ -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…
x
Reference in New Issue
Block a user