Merge branch 'api-docs-3' into 'develop'
More API docs See merge request funkwhale/funkwhale!1181
This commit is contained in:
commit
a1865cf9d8
|
@ -1,5 +1,4 @@
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from dynamic_preferences.api.viewsets import GlobalPreferencesViewSet
|
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
from rest_framework.urlpatterns import format_suffix_patterns
|
from rest_framework.urlpatterns import format_suffix_patterns
|
||||||
|
|
||||||
|
@ -14,7 +13,6 @@ from funkwhale_api.tags import views as tags_views
|
||||||
from funkwhale_api.users import jwt_views
|
from funkwhale_api.users import jwt_views
|
||||||
|
|
||||||
router = common_routers.OptionalSlashRouter()
|
router = common_routers.OptionalSlashRouter()
|
||||||
router.register(r"settings", GlobalPreferencesViewSet, basename="settings")
|
|
||||||
router.register(r"activity", activity_views.ActivityViewSet, "activity")
|
router.register(r"activity", activity_views.ActivityViewSet, "activity")
|
||||||
router.register(r"tags", tags_views.TagViewSet, "tags")
|
router.register(r"tags", tags_views.TagViewSet, "tags")
|
||||||
router.register(r"plugins", common_views.PluginViewSet, "plugins")
|
router.register(r"plugins", common_views.PluginViewSet, "plugins")
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
# Undocumented endpoints:
|
# Undocumented endpoints:
|
||||||
# /api/v1/settings
|
|
||||||
# /api/v1/activity
|
|
||||||
# /api/v1/playlist-tracks
|
# /api/v1/playlist-tracks
|
||||||
# /api/v1/search
|
|
||||||
# /api/v1/radios
|
# /api/v1/radios
|
||||||
# /api/v1/history
|
# /api/v1/history
|
||||||
|
|
||||||
|
@ -1338,6 +1335,69 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
204:
|
204:
|
||||||
$ref: "#/responses/204"
|
$ref: "#/responses/204"
|
||||||
|
|
||||||
|
##########
|
||||||
|
# Others #
|
||||||
|
##########
|
||||||
|
/api/v1/search:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- "Other"
|
||||||
|
description:
|
||||||
|
Search artists, tracks, albums and other resources
|
||||||
|
parameters:
|
||||||
|
- $ref: "./api/parameters.yml#/Search"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
$ref: "#/responses/200"
|
||||||
|
400:
|
||||||
|
$ref: "#/responses/400"
|
||||||
|
|
||||||
|
/api/v1/instance/settings:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- "Other"
|
||||||
|
description:
|
||||||
|
Retrieve pod-level configuration such as description or max playlist size
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: "array"
|
||||||
|
description: "List of settings with their id, label and values"
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
description: "Name of the setting"
|
||||||
|
example: "max_channels"
|
||||||
|
section:
|
||||||
|
type: "string"
|
||||||
|
description: "Group of the setting"
|
||||||
|
example: "audio"
|
||||||
|
identifier:
|
||||||
|
type: "string"
|
||||||
|
description: "Unique identifier of the setting"
|
||||||
|
example: "audio__max_channels"
|
||||||
|
default:
|
||||||
|
description: Default value of the setting
|
||||||
|
value:
|
||||||
|
description: Current value of the setting
|
||||||
|
verbose_name:
|
||||||
|
type: "string"
|
||||||
|
description: Human-readable label of the setting
|
||||||
|
help_text:
|
||||||
|
type: "string"
|
||||||
|
description: Human-readable description of the setting
|
||||||
|
field:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
input_type:
|
||||||
|
type: string
|
||||||
|
description: "Input type of the setting"
|
||||||
|
|
||||||
|
|
||||||
/api/v1/attachments/:
|
/api/v1/attachments/:
|
||||||
post:
|
post:
|
||||||
|
|
Loading…
Reference in New Issue