X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Foperations%2Ftimeline_operation.ex;h=01396642c6776d60ac1c2db5d3d5feabcc457471;hb=f1f773f2c76b877f372767963a35c8e827f8d6e6;hp=8e19bace7a9285a5a6b18814a0120b72529376be;hpb=604a83ae3efe21b231fb524203a883a062102546;p=akkoma
diff --git a/lib/pleroma/web/api_spec/operations/timeline_operation.ex b/lib/pleroma/web/api_spec/operations/timeline_operation.ex
index 8e19bace7..01396642c 100644
--- a/lib/pleroma/web/api_spec/operations/timeline_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/timeline_operation.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.TimelineOperation do
@@ -25,6 +25,8 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
security: [%{"oAuth" => ["read:statuses"]}],
parameters: [
local_param(),
+ remote_param(),
+ only_media_param(),
with_muted_param(),
exclude_visibilities_param(),
reply_visibility_param() | pagination_params()
@@ -59,7 +61,9 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
security: [%{"oAuth" => ["read:statuses"]}],
parameters: [
local_param(),
+ instance_param(),
only_media_param(),
+ remote_param(),
with_muted_param(),
exclude_visibilities_param(),
reply_visibility_param() | pagination_params()
@@ -106,6 +110,7 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
),
local_param(),
only_media_param(),
+ remote_param(),
with_muted_param(),
exclude_visibilities_param() | pagination_params()
],
@@ -131,6 +136,9 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
required: true
),
with_muted_param(),
+ local_param(),
+ remote_param(),
+ only_media_param(),
exclude_visibilities_param() | pagination_params()
],
operationId: "TimelineController.list",
@@ -158,8 +166,17 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
)
end
+ defp instance_param do
+ Operation.parameter(
+ :instance,
+ :query,
+ %Schema{type: :string},
+ "Show only statuses from the given domain"
+ )
+ end
+
defp with_muted_param do
- Operation.parameter(:with_muted, :query, BooleanLike, "Includeactivities by muted users")
+ Operation.parameter(:with_muted, :query, BooleanLike, "Include activities by muted users")
end
defp exclude_visibilities_param do
@@ -188,4 +205,13 @@ defmodule Pleroma.Web.ApiSpec.TimelineOperation do
"Show only statuses with media attached?"
)
end
+
+ defp remote_param do
+ Operation.parameter(
+ :remote,
+ :query,
+ %Schema{allOf: [BooleanLike], default: false},
+ "Show only remote statuses?"
+ )
+ end
end