MoJo2600 / pixelframe

8 stars 0 forks source link

The user can change the brightness of the pixelframe #6

Closed MoJo2600 closed 3 years ago

MoJo2600 commented 3 years ago

When the pixelframe is configured and running, it has a webserver running, which can be accessed with its IP or the url pixelframe.local. This website has a option to change settings. By changing the brightness setting, the brightness can be adjusted.

Tasks:

MoJo2600 commented 3 years ago

My proposal for the api would be something like this

swagger: "2.0"
info:
  version: "1.0.0"
  title: "Pixelframe"
host: "localhost"
basePath: "/v1"
tags:
- name: "settings"
  description: "Settings"
schemes:
- "http"
paths:
  /settings:
    post:
      tags:
      - "settings"
      summary: "Change settings"
      produces:
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "settings to change"
        required: true
        schema:
          type: object
          properties:
            brightness:
              type: "integer"
              minimum: 0
              maximum: 255
      responses:
        "200":
          description: "successful operation"
          schema:
            type: object
            properties:
              status:
                type: "string"
                default: "ok"

What do you think @KriegerTobias ?

KriegerTobias commented 3 years ago

Basic API design aligned and committed in b988cdc.

MoJo2600 commented 3 years ago

I think this is done