Files
ollama-plus/tools/spec/roku.openapi.json
T
2025-09-11 17:28:09 -04:00

136 lines
2.3 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Roku Remote HTTP API",
"description": "tiny http wrapper around the `roku` python library",
"version": "1.0.0"
},
"servers": [
{
"url": "http://{host}:{port}",
"variables": {
"host": {
"default": "0.0.0.0"
},
"port": {
"default": "8000"
}
}
}
],
"paths": {
"/{command}": {
"get": {
"operationId": "sendRokuCommand",
"summary": "send a command to the configured roku",
"parameters": [
{
"name": "command",
"in": "path",
"required": true,
"description": "one of the supported roku commands.",
"schema": {
"$ref": "#/components/schemas/RokuCommand"
}
}
],
"responses": {
"200": {
"description": "command accepted and sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Result"
}
}
}
},
"404": {
"description": "unknown endpoint or unsupported command",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "unhandled server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Result": {
"type": "object",
"additionalProperties": false,
"properties": {
"result": {
"type": "string"
}
},
"required": [
"result"
]
},
"Error": {
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "string"
}
},
"required": [
"error"
]
},
"RokuCommand": {
"type": "string",
"enum": [
"home",
"reverse",
"forward",
"play",
"select",
"left",
"right",
"down",
"up",
"back",
"replay",
"info",
"backspace",
"search",
"enter",
"literal",
"find_remote",
"volume_down",
"volume_up",
"volume_mute",
"channel_up",
"channel_down",
"input_tuner",
"input_hdmi1",
"input_hdmi2",
"input_hdmi3",
"input_hdmi4",
"input_av1",
"power",
"poweroff",
"poweron"
]
}
}
}
}