Giter Site home page Giter Site logo

musicbot-api's Introduction

Björn's github stats

musicbot-api's People

Contributors

bjoernpetersen avatar felixgail avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

musicbot-api's Issues

Add permission management

Managing other user's permissions would be a nice feature.

Requirements:

  • Endpoints to view and edit users
  • A permission allowing access to the above endpoints

Actions are run multiple times

Pull Requests from branches are run multiple times.

Possible fix:

on: 
  push:
    branches: master
  pull_request:

This would however exclude branches without pull request

Add configuration operations

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.

Add permissions enum

For reliable deserialization of JSON payloads containing permissions, JWT claims and pre-api call auth checks a list of possible permissions would be useful

Add playback progress of current song

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

Add /volume endpoint

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 response
  • PUT should just not have an effect but behave as if the operation was a success

A 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
}

Add repsonse code for disabled registrations

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.

Support Volume groups and multiple volumes

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.

/token endpoint misdefined

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

Change all return types to json

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.