bjoernpetersen / musicbot-api Goto Github PK
View Code? Open in Web Editor NEWOpenAPI specification of the MusicBot REST-API
License: MIT License
OpenAPI specification of the MusicBot REST-API
License: MIT License
Managing other user's permissions would be a nice feature.
Requirements:
Pull Requests from branches are run multiple times.
Possible fix:
on:
push:
branches: master
pull_request:
This would however exclude branches without pull request
Bot configuration is currently limited to the GUI on the server machine. It would be nice to be able to edit the configuration via the API. Since most plugins don't support runtime configuration changes, it'll probably best to edit a "pending" configuration that will be applied at restart and add a restart operation to the API.
Note that enabling and disabling plugins is out of scope for this issue.
Related: BjoernPetersen/MusicBot#99
For reliable deserialization of JSON payloads containing permissions, JWT claims and pre-api call auth checks a list of possible permissions would be useful
Having the timestamp when the playback of the current song started in the SongEntry
of the current PlayerState
would enable clients to show the playback progress like YouTube Music, Spotify etc. do
The endpoint should support a GET
and a PUT
operation.
Some MusicBot configurations will not be able to support this feature. In that case:
GET
should indicate the missing support in addition to a normal dummy responsePUT
should just not have an effect but behave as if the operation was a successA possible response format could be:
{
"volume": 42,
"isSupported": true
}
In case the operation is "unsupported", the volume
could be always 100
and the supported
property be false
:
{
"volume": 100,
"isSupported": false
}
/provider/{providerId}/song/{songId}
As servers may choose not to allow new registrations, a status code needs to be defined for POST /user
requests in that case. Status code 403 is probably the most appropriate.
When using the bot in a multi-room setup it might be nice to be able to control the volumes separately.
Something in the likes of:
Volume:
type: object
additionalProperties: false
description: >
Information about the bot volume.
required:
- master
- isSupported
properties:
master:
description: The master volume between 0 and 100.
type: integer
minimum: 0
maximum: 100
speakers:
description: Volume of individual speakers to control
type: array
items:
$ref: '#/components/schemas/Speaker'
isSupported:
description: Whether volume control is actually supported by the bot.
type: boolean
Speaker:
type: object
additionalProperties: false
description: >
A loudspeaker whose volume can be controlled
required:
- volume
- name
properties:
volume:
description: A volume between 0 and 100.
type: integer
minimum: 0
maximum: 100
name:
description: A pretty name for the speaker
type: string
This way single room instances can use only the master property, while multi-room setups use the master as group.
The /token
endpoint is defined as GET
(and as such without a request body) but actually accepts a PUT
request with LoginCredentials
as body, returning an authentication token
All endpoints should return actual JSON.
Endpoints currently returning text/plain
or JSON with the simple schema string
should return JSON objects with a specific key instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.