diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2021-11-22 19:44:30 +0100 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2021-12-02 16:08:44 +0100 |
commit | cd5fb84b76a51fe6c7b5d672298a87c34737c303 (patch) | |
tree | af3383fb2d95518308f26167699f1cae2cf1b0a0 /lib/pleroma/web/api_spec | |
parent | c97f99ccf2a51c7f1078d7a20006deae2df3d12c (diff) | |
download | pleroma-cd5fb84b76a51fe6c7b5d672298a87c34737c303.tar.gz |
remote_interaction API endpoint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'lib/pleroma/web/api_spec')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/twitter_util_operation.ex | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex index ebcfd3be2..1a2dbb166 100644 --- a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex +++ b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex @@ -237,4 +237,30 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do responses: %{200 => Operation.response("Web Page", "test/html", %Schema{type: :string})} } end + + def remote_interaction_operation do + %Operation{ + tags: ["Accounts"], + summary: "Remote interaction", + operationId: "UtilController.remote_interaction", + requestBody: request_body("Parameters", remote_interaction_request(), required: true), + responses: %{ + 200 => + Operation.response("Remote interaction URL", "application/json", %Schema{type: :object}) + } + } + end + + defp remote_interaction_request do + %Schema{ + title: "RemoteInteractionRequest", + description: "POST body for remote interaction", + type: :object, + required: [:ap_id, :profile], + properties: %{ + ap_id: %Schema{type: :string, description: "Profile or status ActivityPub ID"}, + profile: %Schema{type: :string, description: "Remote profile webfinger"} + } + } + end end |