2020-04-07 08:29:05 -06:00
|
|
|
# Pleroma: A lightweight social networking server
|
2022-02-25 23:11:42 -07:00
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
2020-04-07 08:29:05 -06:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-04-09 05:25:24 -06:00
|
|
|
defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do
|
2020-04-07 08:29:05 -06:00
|
|
|
alias OpenApiSpex.Schema
|
2020-04-21 13:54:45 -06:00
|
|
|
alias Pleroma.Web.ApiSpec.Schemas.FlakeID
|
2020-04-07 08:29:05 -06:00
|
|
|
|
|
|
|
require OpenApiSpex
|
|
|
|
|
|
|
|
OpenApiSpex.schema(%{
|
2020-04-09 05:25:24 -06:00
|
|
|
title: "AccountRelationship",
|
2021-02-03 08:10:43 -07:00
|
|
|
description: "Relationship between current account and requested account",
|
2020-04-07 08:29:05 -06:00
|
|
|
type: :object,
|
|
|
|
properties: %{
|
|
|
|
blocked_by: %Schema{type: :boolean},
|
2020-04-09 05:25:24 -06:00
|
|
|
blocking: %Schema{type: :boolean},
|
|
|
|
domain_blocking: %Schema{type: :boolean},
|
|
|
|
endorsed: %Schema{type: :boolean},
|
|
|
|
followed_by: %Schema{type: :boolean},
|
|
|
|
following: %Schema{type: :boolean},
|
2020-04-21 13:54:45 -06:00
|
|
|
id: FlakeID,
|
2020-04-07 08:29:05 -06:00
|
|
|
muting: %Schema{type: :boolean},
|
|
|
|
muting_notifications: %Schema{type: :boolean},
|
2021-11-21 08:53:30 -07:00
|
|
|
note: %Schema{type: :string},
|
2020-04-07 08:29:05 -06:00
|
|
|
requested: %Schema{type: :boolean},
|
2020-04-09 05:25:24 -06:00
|
|
|
showing_reblogs: %Schema{type: :boolean},
|
2021-12-06 13:23:34 -07:00
|
|
|
subscribing: %Schema{type: :boolean},
|
|
|
|
notifying: %Schema{type: :boolean}
|
2020-04-07 08:29:05 -06:00
|
|
|
},
|
|
|
|
example: %{
|
2020-04-21 13:30:24 -06:00
|
|
|
"blocked_by" => false,
|
|
|
|
"blocking" => false,
|
|
|
|
"domain_blocking" => false,
|
|
|
|
"endorsed" => false,
|
|
|
|
"followed_by" => false,
|
|
|
|
"following" => false,
|
|
|
|
"id" => "9tKi3esbG7OQgZ2920",
|
|
|
|
"muting" => false,
|
|
|
|
"muting_notifications" => false,
|
2021-11-21 08:53:30 -07:00
|
|
|
"note" => "",
|
2020-04-21 13:30:24 -06:00
|
|
|
"requested" => false,
|
|
|
|
"showing_reblogs" => true,
|
2021-12-06 13:23:34 -07:00
|
|
|
"subscribing" => false,
|
|
|
|
"notifying" => false
|
2020-04-07 08:29:05 -06:00
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|