Skip to content
Snippets Groups Projects
Commit 3d58f87b authored by Agate's avatar Agate :speech_balloon:
Browse files

More API docs

parent d3e36c16
No related branches found
No related tags found
No related merge requests found
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 ...@@ -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")
......
# 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
...@@ -1339,6 +1336,69 @@ paths: ...@@ -1339,6 +1336,69 @@ paths:
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:
tags: tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment