mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
add accept/reject routes for server followers in openapi spec
This commit is contained in:
parent
da35b419cd
commit
06dc7a1b96
@ -505,31 +505,15 @@ paths:
|
|||||||
maxItems: 100
|
maxItems: 100
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Job'
|
$ref: '#/components/schemas/Job'
|
||||||
'/server/following/{host}':
|
|
||||||
delete:
|
|
||||||
security:
|
|
||||||
- OAuth2:
|
|
||||||
- admin
|
|
||||||
tags:
|
|
||||||
- Instance Follows
|
|
||||||
summary: Unfollow a server
|
|
||||||
parameters:
|
|
||||||
- name: host
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: 'The host to unfollow '
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: hostname
|
|
||||||
responses:
|
|
||||||
'201':
|
|
||||||
description: successful operation
|
|
||||||
/server/followers:
|
/server/followers:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Instance Follows
|
- Instance Follows
|
||||||
summary: List instance followers
|
summary: List instances following the server
|
||||||
parameters:
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/followState'
|
||||||
|
- $ref: '#/components/parameters/actorType'
|
||||||
- $ref: '#/components/parameters/start'
|
- $ref: '#/components/parameters/start'
|
||||||
- $ref: '#/components/parameters/count'
|
- $ref: '#/components/parameters/count'
|
||||||
- $ref: '#/components/parameters/sort'
|
- $ref: '#/components/parameters/sort'
|
||||||
@ -539,32 +523,87 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: object
|
||||||
items:
|
properties:
|
||||||
$ref: '#/components/schemas/Follow'
|
total:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Follow'
|
||||||
|
'/server/followers/{nameWithHost}':
|
||||||
|
delete:
|
||||||
|
summary: Remove or reject a follower to your server
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
tags:
|
||||||
|
- Instance Follows
|
||||||
|
parameters:
|
||||||
|
- name: nameWithHost
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The remote actor handle to remove from your followers
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: follower not found
|
||||||
|
'/server/followers/{nameWithHost}/reject':
|
||||||
|
post:
|
||||||
|
summary: Reject a pending follower to your server
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
tags:
|
||||||
|
- Instance Follows
|
||||||
|
parameters:
|
||||||
|
- name: nameWithHost
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The remote actor handle to remove from your followers
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: follower not found
|
||||||
|
'/server/followers/{nameWithHost}/accept':
|
||||||
|
post:
|
||||||
|
summary: Accept a pending follower to your server
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
tags:
|
||||||
|
- Instance Follows
|
||||||
|
parameters:
|
||||||
|
- name: nameWithHost
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The remote actor handle to remove from your followers
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: follower not found
|
||||||
|
|
||||||
/server/following:
|
/server/following:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Instance Follows
|
- Instance Follows
|
||||||
summary: List instances followed by the server
|
summary: List instances followed by the server
|
||||||
parameters:
|
parameters:
|
||||||
- name: state
|
- $ref: '#/components/parameters/followState'
|
||||||
in: query
|
- $ref: '#/components/parameters/actorType'
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- pending
|
|
||||||
- accepted
|
|
||||||
- name: actorType
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- Person
|
|
||||||
- Application
|
|
||||||
- Group
|
|
||||||
- Service
|
|
||||||
- Organization
|
|
||||||
- $ref: '#/components/parameters/start'
|
- $ref: '#/components/parameters/start'
|
||||||
- $ref: '#/components/parameters/count'
|
- $ref: '#/components/parameters/count'
|
||||||
- $ref: '#/components/parameters/sort'
|
- $ref: '#/components/parameters/sort'
|
||||||
@ -574,16 +613,22 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: object
|
||||||
items:
|
properties:
|
||||||
$ref: '#/components/schemas/Follow'
|
total:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Follow'
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
- OAuth2:
|
- OAuth2:
|
||||||
- admin
|
- admin
|
||||||
tags:
|
tags:
|
||||||
- Instance Follows
|
- Instance Follows
|
||||||
summary: Follow a server
|
summary: Follow a list of servers
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -601,6 +646,28 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
format: hostname
|
format: hostname
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
|
'/server/following/{host}':
|
||||||
|
delete:
|
||||||
|
summary: Unfollow a server
|
||||||
|
security:
|
||||||
|
- OAuth2:
|
||||||
|
- admin
|
||||||
|
tags:
|
||||||
|
- Instance Follows
|
||||||
|
parameters:
|
||||||
|
- name: host
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The host to unfollow
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: hostname
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: successful operation
|
||||||
|
'404':
|
||||||
|
description: host not found
|
||||||
|
|
||||||
/users:
|
/users:
|
||||||
post:
|
post:
|
||||||
summary: Create a user
|
summary: Create a user
|
||||||
@ -4378,6 +4445,25 @@ components:
|
|||||||
- activitypub-refresher
|
- activitypub-refresher
|
||||||
- video-redundancy
|
- video-redundancy
|
||||||
- video-live-ending
|
- video-live-ending
|
||||||
|
followState:
|
||||||
|
name: state
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- pending
|
||||||
|
- accepted
|
||||||
|
actorType:
|
||||||
|
name: actorType
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- Person
|
||||||
|
- Application
|
||||||
|
- Group
|
||||||
|
- Service
|
||||||
|
- Organization
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
OAuth2:
|
OAuth2:
|
||||||
description: |
|
description: |
|
||||||
|
Loading…
Reference in New Issue
Block a user