This commit is contained in:
Deborah Barnard
2022-06-30 11:41:15 +01:00
parent 3a48a9d3d5
commit 2dfd5a7c7e
5 changed files with 17 additions and 13 deletions

View File

@@ -272,7 +272,7 @@ Add the following to the `properties` array, after the `resource` object:
routing: {
request: {
method: 'GET',
url: '/mars-photos/api/v1/{{roverName}}/photos'
url: '/mars-photos/api/v1/={{roverName}}/photos'
}
}
}
@@ -320,8 +320,10 @@ export class NasaPicsApi implements ICredentialType {
authenticate = {
type: 'generic',
properties: {
key: 'api_key',
value: '={{$credentials.apiKey}}',
qs: {
'api_key': '={{$credentials.apiKey}}'
}
},
} as IAuthenticateGeneric;
}

View File

@@ -29,4 +29,4 @@ Object.
#### qs
Object. Stands for "query string".
Object. Stands for "query string."

View File

@@ -15,7 +15,7 @@ The node base file follows this basic structure:
2. Create a class for the node
3. Within the node class, create a `description` object, which defines the node.
A programmatic-style node also has an `execute()` method, which reads incoming data and parameters, then builds a request. The declarative style handles this using the `routing` key in the `properties` object, within `descriptions`.
detailsA programmatic-style node also has an `execute()` method, which reads incoming data and parameters, then builds a request. The declarative style handles this using the `routing` key in the `properties` object, within `descriptions`.
### Outline structure for a declarative-style node
@@ -97,8 +97,8 @@ Array of object. This parameter tells n8n the credential options. Each object de
The object must include:
* `name`: the credential name. Must match the prefix of the credential file. For example, `AsanaAPI` links to the `name` property in `AsanaApi.credential.ts`. [TODO: double check exact name]
* `required`: boolean. Specify whether authentication is required to use this node.
* `name`: the credential name. Must match the `name` property in the credential file. For example, `name: 'asanaApi'` in in [`Asana.node.ts`](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/Asana/Asana.node.ts){:target=_blank .external-class} links to `name = 'asanaApi'` in [`AsanaApi.credential.ts`](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/credentials/AsanaApi.credentials.ts){:target=_blank .external-class}.
* `required`: Boolean. Specify whether authentication is required to use this node.
### requestDefaults
@@ -124,7 +124,7 @@ A resource object includes the following parameters:
* `displayName`: String. This should always be `Resource`.
* `name`: String. This should always be `resource`.
* `type`: String. Tells n8n which UI element to use, and what type of input to expect. For example, `options` results in n8n adding a dropdown that allows users to choose one option. Refer to [Node UI elements](/integrations/creating-nodes/reference/ui-elements/) for more information.
* `noDataExpression`: Boolean. Must always be `true`. [TODO: ask Ivan what it actually does - affects frontend somehow]
* `noDataExpression`: Boolean. Prevents using an expression for the parameter. Must always be `true` for `resource`.
#### Operations
@@ -133,7 +133,7 @@ The operations object defines the available operations on a resource.
* `displayName`: String. This should always be `Options`.
* `name`: String. This should always be `option`.
* `type`: String. Tells n8n which UI element to use, and what type of input to expect. For example, `dateTime` results in n8n adding a date picker. Refer to [Node UI elements](/integrations/creating-nodes/reference/ui-elements/) for more information.
* `noDataExpression`: Boolean. [TODO: what is this? see above]
* `noDataExpression`: Boolean. Prevents using an expression for the parameter. Must always be `true` for `operation`.
* `action`: String. This parameter combines the resource and operation. You should always include it, as n8n will use it in future versions. For example, given a resource called `"Card"` and an operation `"Get all"`, your action is `"Get all cards"`.
### methods

View File

@@ -1,13 +1,13 @@
# Paired items
!!! note "Programmatic-style nodes only"
The information in this document applies to programmatic-style nodes. If you're using declarative style, n8n handles paired items for you automatically.
This guidance applies to programmatic-style nodes. If you're using declarative style, n8n handles paired items for you automatically.
An n8n node operation consumes input items and produces output items. n8n generates an output item from a single input item, except in the Merge node, or any other node that combines or sums items.
To ensure that n8n works, it needs to know which input item a given output item comes from. If this information is missing, expressions on other nodes may break.
n8n needs to know which input item a given output item comes from. If this information is missing, expressions in other nodes may break.
You must provide item pairing information when returning the output of your operations. You can do this using the `pairedInput` [TODO: pairedInput or pairedItem?] key, at the same level as the `json` key in your output:
You must provide item pairing information when returning the output of your operations. You can do this using the `pairedItem` key, at the same level as the `json` key in your output:
[TODO: clarify wtf is going on here]
```js
@@ -15,6 +15,6 @@ You must provide item pairing information when returning the output of your oper
json: {
...
},
pairedInput: 3 // The index of the corresponding input item
pairedItem: 3 // The index of the corresponding input item
}]
```

View File

@@ -1,6 +1,8 @@
Asana
Axios
backend
Boolean
boolean
Clockify
Cron
Dockerfile