UNPKG

node-red-contrib-conta-azul-api

Version:
74 lines (68 loc) 3.69 kB
<!-- <style> .responsive-iframe { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; } .responsive-iframe iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style> --> <p>This node enables you to work with the Conta Azul API, giving you the ability to set parameters through the Node-RED-UI and trigger the flow from within your existing flow.</p> <p>Use OpenAPI / Swagger with Node-Red.</p> <!-- <img src="https://developers.contaazul.com/images/logo-contaazul.svg" alt="Conta Azul Developer"> --> <!-- <div class="responsive-iframe"> <embed src="/admin/changelog"></embed> </div> --> <h3>Inputs</h3> <dl class="message-properties"> <dt>Name <span class="property-type">string</span> </dt> <dd> set a manuell name for the node. If no name is set, the node sets the selected operation name.</dd> <dt>API tag <span class="property-type">enum</span> </dt> <dd> Preselector for the operation. Grouped by the 'tags' in each operation. </dd> <dt>Operation <span class="property-type">enum</span> </dt> <dd> Selector for the OpenAPI operation. The selection name is set by the 'summary'. Behind the selector field is the (unique) operation id. By mouse-over it will show the full operation Description.</dd> <dt class="optional">Parameters <span class="property-type">depending</span></dt> <dd> If the selected operation has parameters, they will be listed here. The description can be found by mouse-over the parameter name. If the parameter is required, it will be marked with a red star behind the name. For Json Objects with defined keys there will be 3 Buttons: 'set required' and 'set default' will build a json-object with the correct key names and the necessary type info as the value. 'show keys' show all possible key parameters with additional info by mouse-over the key name. </dd> <dt>Request / Response content type <span class="property-type">selection</span> </dt> <dd> If available select the content type in which you will send / receive the data. For the most cases 'application/json' will be a good choice.</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>Payload <span class="property-type">object</span> <dd> Returns the complete OpenAPI object.</dd> </dt> </dl> <h3>Authentification</h3> For authentification you can use the Node-Red to get your token. This token has to be set into msg.openApiToken. <h3>Error handling</h3> This handles how to react if the server returns a http status of 4xx or 5xx. You can find the last server response in msg.response. <dl class="message-properties"> <dt>Standard <span class="property-type">string</span> </dt> <dd> The flow will move on normally so you can choose how to handle this within your flow.</dd> <dt> Other output <span class="property-type">string</span></dt> <dd> The flow will move on in a second output.</dd> <dt> Throw exception <span class="property-type">string</span></dt> <dd> The flow will throw an exception. This exception can be catched by the 'catch' node.</dd> </dl> <h3>References</h3> <ul> <li><a href="https://www.npmjs.com/package/swagger-client">Based on npm swagger-client</a> - which does almost all the magic here</li> <li><a href="https://gitlab.com/2WeltenChris/svelte-integration-red">SIR</a> - Node designed with svelte</li> <li><a href="https://developers.contaazul.com/">Conta Azul</a> - developers.contaazul.com</li> </ul>