mirror of https://gitlab.com/litecord/litecord.git
docs/admin_api.md: add Guilds and Guild features sections
This commit is contained in:
parent
30be092c3c
commit
276fc4c093
|
|
@ -45,3 +45,30 @@ Mark a voice region as deprecated. Disables any voice actions on guilds that are
|
|||
using the voice region.
|
||||
|
||||
Returns empty body with 204 status code on success.
|
||||
|
||||
## Guilds
|
||||
|
||||
### GET `/guilds/<guild_id>`
|
||||
|
||||
Returns a partial guild object.
|
||||
|
||||
## Guild features
|
||||
|
||||
### PATCH `/guilds/<guild_id>/features`
|
||||
|
||||
Patch the entire features list. Returns the new feature list following the same
|
||||
structure as the input.
|
||||
|
||||
| field | type | description |
|
||||
| --: | :-- | :-- |
|
||||
| features | List[string] | new list of features |
|
||||
|
||||
### PUT `/guilds/<guild_id>/features`
|
||||
|
||||
Insert features. Receives and returns the same structure as
|
||||
PATCH `/guilds/<guild_id>/features`.
|
||||
|
||||
### DELETE `/guilds/<guild_id>/features`
|
||||
|
||||
Remove features. Receives and returns the same structure as
|
||||
PATCH `/guilds/<guild_id>/features`.
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ async def insert_features(guild_id: int):
|
|||
return await _features(guild_id)
|
||||
|
||||
|
||||
@bp.route('/<int:guild_id>/<feature>', methods=['DELETE'])
|
||||
async def remove_feature(guild_id: int):
|
||||
@bp.route('/<int:guild_id>/features', methods=['DELETE'])
|
||||
async def remove_features(guild_id: int):
|
||||
"""Remove a feature from a guild"""
|
||||
await admin_check()
|
||||
to_remove = await _features_from_req()
|
||||
|
|
|
|||
Loading…
Reference in New Issue