diff --git a/package.json b/package.json index cc972bd..5a2f99b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "node-red": { "nodes": { "ts3-config": "dist/nodes/ts3-config/ts3-config.js", - "ts3-get": "dist/nodes/ts3-get/ts3-get.js" + "ts3-get": "dist/nodes/ts3-call/ts3-call.js" } }, "dependencies": { diff --git a/src/nodes/ts3-get/ts3-get.ts b/src/nodes/ts3-call/ts3-call.ts similarity index 88% rename from src/nodes/ts3-get/ts3-get.ts rename to src/nodes/ts3-call/ts3-call.ts index 08456cc..fc44512 100644 --- a/src/nodes/ts3-get/ts3-get.ts +++ b/src/nodes/ts3-call/ts3-call.ts @@ -1,12 +1,12 @@ import { NodeInitializer } from "node-red"; import { TeamSpeak } from "ts3-nodejs-library"; import { Ts3ConfigNode } from "../ts3-config/types"; -import { Ts3GetConfig, Ts3GetNode } from "./types"; +import { Ts3CallConfig, Ts3CallNode } from "./types"; const nodeInit: NodeInitializer = (RED): void => { - function Ts3Get( - this: Ts3GetNode, - config: Ts3GetConfig + function Ts3Call( + this: Ts3CallNode, + config: Ts3CallConfig ): void { RED.nodes.createNode(this, config); @@ -48,7 +48,7 @@ const nodeInit: NodeInitializer = (RED): void => { }) } - RED.nodes.registerType("ts3-get", Ts3Get); + RED.nodes.registerType("ts3-call", Ts3Call); }; export = nodeInit; diff --git a/src/nodes/ts3-call/types.ts b/src/nodes/ts3-call/types.ts new file mode 100644 index 0000000..7269382 --- /dev/null +++ b/src/nodes/ts3-call/types.ts @@ -0,0 +1,15 @@ +import { NodeDef, Node, EditorNodeProperties } from "node-red"; + +export interface Ts3CallProps { + configid: string + selection: string +} + +export interface Ts3CallData { +} + +export interface Ts3CallConfig extends NodeDef, Ts3CallProps { } + +export interface Ts3CallNode extends Node, Ts3CallData {} + +export interface Ts3CallEditorNodeProperties extends EditorNodeProperties,Ts3CallProps {} diff --git a/src/nodes/ts3-get/ui/editor.html b/src/nodes/ts3-call/ui/editor.html similarity index 100% rename from src/nodes/ts3-get/ui/editor.html rename to src/nodes/ts3-call/ui/editor.html diff --git a/src/nodes/ts3-call/ui/help.html b/src/nodes/ts3-call/ui/help.html new file mode 100644 index 0000000..82cb000 --- /dev/null +++ b/src/nodes/ts3-call/ui/help.html @@ -0,0 +1 @@ +
Call a function on a Teamspeak 3 server.
\ No newline at end of file diff --git a/src/nodes/ts3-get/ui/index.ts b/src/nodes/ts3-call/ui/index.ts similarity index 64% rename from src/nodes/ts3-get/ui/index.ts rename to src/nodes/ts3-call/ui/index.ts index 8d4386c..a42df26 100644 --- a/src/nodes/ts3-get/ui/index.ts +++ b/src/nodes/ts3-call/ui/index.ts @@ -1,9 +1,9 @@ import { EditorRED } from "node-red"; -import { Ts3GetEditorNodeProperties } from "../types"; +import { Ts3CallEditorNodeProperties } from "../types"; declare const RED: EditorRED; -RED.nodes.registerTypeGet information from a Teamspeak 3 server.
\ No newline at end of file