mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 14:12:24 -05:00
⚡ Fix node name and color
⚡ Add initial Resource and Operation
This commit is contained in:
parent
1f0e9fc3e6
commit
71978520ba
1 changed files with 48 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import { INodeType, INodeTypeDescription } from "n8n-workflow";
|
import { INodeType, INodeTypeDescription } from "n8n-workflow";
|
||||||
|
|
||||||
|
// Description of our Node
|
||||||
export class HttpBin implements INodeType {
|
export class HttpBin implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
displayName: "HttpBin",
|
displayName: "HttpBin",
|
||||||
|
|
@ -10,15 +11,15 @@ export class HttpBin implements INodeType {
|
||||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||||
description: "Interact with HttpBin API",
|
description: "Interact with HttpBin API",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: "Sendinblue",
|
name: "HttpBin",
|
||||||
color: "#044a75",
|
color: "#3b4151",
|
||||||
},
|
},
|
||||||
inputs: ["main"],
|
inputs: ["main"],
|
||||||
outputs: ["main"],
|
outputs: ["main"],
|
||||||
credentials: [
|
credentials: [
|
||||||
{
|
{
|
||||||
name: "sendinblueApi",
|
name: "httpbinApi",
|
||||||
required: true,
|
required: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
requestDefaults: {
|
requestDefaults: {
|
||||||
|
|
@ -29,6 +30,48 @@ export class HttpBin implements INodeType {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
properties: [],
|
/**
|
||||||
|
* In the properties array we have two mandatory options objects required
|
||||||
|
*
|
||||||
|
* Resource & Operation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
properties: [
|
||||||
|
{
|
||||||
|
displayName: "Resource",
|
||||||
|
name: "resource",
|
||||||
|
type: "options",
|
||||||
|
noDataExpression: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "Http Verbs",
|
||||||
|
value: "httpverbs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Auth Methods",
|
||||||
|
value: "authmethods",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: "httpverbs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: "Operation",
|
||||||
|
name: "operation",
|
||||||
|
type: "options",
|
||||||
|
noDataExpression: true,
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: ["httpverbs"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "GET",
|
||||||
|
value: "getMethod",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: "getMethod",
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue