Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21841583
pleroma_instances_operation.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
pleroma_instances_operation.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.ApiSpec.PleromaInstancesOperation
do
alias
OpenApiSpex.Operation
alias
OpenApiSpex.Schema
def
open_api_operation
(
action
)
do
operation
=
String
.
to_existing_atom
(
"
#{
action
}
_operation"
)
apply
(
__MODULE__
,
operation
,
[])
end
def
show_operation
do
%
Operation
{
tags
:
[
"PleromaInstances"
],
summary
:
"Instances federation status"
,
description
:
"Information about instances deemed unreachable by the server"
,
operationId
:
"PleromaInstances.show"
,
responses
:
%{
200
=>
Operation
.
response
(
"PleromaInstances"
,
"application/json"
,
pleroma_instances
())
}
}
end
def
pleroma_instances
do
%
Schema
{
type
:
:object
,
properties
:
%{
unreachable
:
%
Schema
{
type
:
:object
,
properties
:
%{
hostname
:
%
Schema
{
type
:
:string
,
format
:
:"date-time"
}}
}
},
example
:
%{
"unreachable"
=>
%{
"consistently-unreachable.name"
=>
"2020-10-14 22:07:58.216473"
}
}
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Dec 27, 11:50 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
764686
Default Alt Text
pleroma_instances_operation.ex (1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment