From 9b534bb024f3b38bec5e14c364d85e9cb5732845 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Tue, 28 Nov 2023 19:25:04 +0100 Subject: [PATCH] Add documentation for VAPID public key in instance metadata (#1342) * Add documentation for VAPID public key in instance metadata * Mark Application#vapid_key as deprecated --- content/en/entities/Application.md | 17 ++++++++++------- content/en/entities/Instance.md | 9 +++++++++ content/en/methods/instance.md | 3 +++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/content/en/entities/Application.md b/content/en/entities/Application.md index 48f5c217..5ce71c8e 100644 --- a/content/en/entities/Application.md +++ b/content/en/entities/Application.md @@ -39,13 +39,6 @@ aliases: [ 0.9.9 - added\ 3.5.1 - this property is now nullable -### `vapid_key` {#vapid_key} - -**Description:** Used for Push Streaming API. Returned with [POST /api/v1/apps]({{< relref "methods/apps#create" >}}). Equivalent to [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}})\ -**Type:** String\ -**Version history:**\ -2.8.0 - added - ### `client_id` {{%optional%}} {#client_id} **Description:** Client ID key, to be used for obtaining OAuth tokens\ @@ -60,6 +53,16 @@ aliases: [ **Version history:**\ 0.9.9 - added +## Deprecated attributes + +### `vapid_key` {#vapid_key} + +**Description:** Used for Push Streaming API. Returned with [POST /api/v1/apps]({{< relref "methods/apps#create" >}}). Equivalent to [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}}) and [Instance#vapid_public_key]({{< relref "entities/Instance#vapid_public_key" >}})\ +**Type:** String\ +**Version history:**\ +2.8.0 - added +4.3.0 - deprecated pending removal + ## See also {{< page-relref ref="methods/apps" caption="apps API methods" >}} diff --git a/content/en/entities/Instance.md b/content/en/entities/Instance.md index 18a9e23e..ab17c154 100644 --- a/content/en/entities/Instance.md +++ b/content/en/entities/Instance.md @@ -41,6 +41,9 @@ aliases: [ "urls": { "streaming": "wss://mastodon.social" }, + "vapid": { + "public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc=" + }, "accounts": { "max_featured_tags": 10 }, @@ -290,6 +293,12 @@ aliases: [ **Version history:**\ 4.0.0 - added +### `configuration[vapid][public_key]` (#vapid_public_key) +**Description:** The instances VAPID public key, used for push notifications, the same as [WebPushSubscription#server_key]({{< relref "entities/WebPushSubscription#server_key" >}}).\ +**Type:** String\ +**Version history:**\ +4.3.0 - added + #### `configuration[accounts]` {#accounts} **Description:** Limits related to accounts.\ diff --git a/content/en/methods/instance.md b/content/en/methods/instance.md index 46d8df6b..a6f1823c 100644 --- a/content/en/methods/instance.md +++ b/content/en/methods/instance.md @@ -61,6 +61,9 @@ Obtain general information about the server. "urls": { "streaming": "wss://mastodon.social" }, + "vapid": { + "public_key": "BCkMmVdKDnKYwzVCDC99Iuc9GvId-x7-kKtuHnLgfF98ENiZp_aj-UNthbCdI70DqN1zUVis-x0Wrot2sBagkMc=" + }, "accounts": { "max_featured_tags": 10 },