bitfocus / companion-module-renewedvision-pvp

MIT License
1 stars 2 forks source link

Add support for Layer Presets #5

Closed chrisrouse closed 5 years ago

chrisrouse commented 5 years ago

Layer Presets only need to accept an ID value.

Available Layer Presets

/layerPreset

GET

Gets all the layer presets available

Request:

curl -X GET http://localhost:8080/api/0/layerPreset -k

JSON Response:

{
  "data" : [
   {
    "id": "example", 
    "name": "exampleBlendModeName"
    }
  ]
}

Layer Preset

/layerPreset/layer/{id}

GET Gets the layer preset for a specific layer

Parameters

Parameter Description
id Can be a uuid (string), name (string), or index (integer) of the layer we want to get the layerPreset from

Notes

Request:

curl -X GET http://localhost:8080/api/0/layerPreset/layer/0 -k

JSON Response:

{
  "data" : [
   {
    "id": "example", 
    "name": "exampleBlendModeName"
    }
  ]
}

POST

Sets the layer preset for a specific layer

Parameters

Parameter Description
id Can be a uuid (string), name (string), or index (integer) of the layer we want to set the layerPreset on

Request Body JSON

Key Description
value The representation is a (string) for the name of the layer preset

Notes

    Request:

curl -X POST http://localhost:8080/api/0/layerPreset/layer/0 -k

    JSON Body:

{
    "value": "exampleLayerPresetName", 
}
chrisrouse commented 5 years ago

https://gist.github.com/chrisrouse/a14205fa0a1645536b1fa631ca0a415f