node-red-contrib-postcodes-io
v0.1.0
Published
NodeRED nodes to wrap postcodes.io API
Downloads
8
Maintainers
Readme
NodeRED nodes to wrap postcodes.io API
A set of nodes that wrap the postcodes.io service.
Installation
npm install node-red-contrib-postcodes-io
Implemented Nodes
- Postcode Lookup - Lookup information about a valid 'live' UK Postcode. Lat/Lng will be provided in the response
- Postcode Exists - Check if a Postcode is valid 'live' UK Postcode
- Postcode Near - Find the Postcodes closest to another valid Postcode. Searching can be done via a Postcode or Lat/Lng
- Postcode Random - Get a random Postcode
- Postcode Reverse Geocode - Find the single closest 'live' uk Postcode to a coordinate
Test
After installing import the nodes to test them out.
[{"id":"907de804.6f8218","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":60,"wires":[]},{"id":"51414f5.faebeb","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":60,"wires":[["deceb206.21315"]]},{"id":"deceb206.21315","type":"postcode-lookup","z":"234c0ab5.dcb3f6","name":"","postcode":"SE1 8NW","x":330,"y":60,"wires":[["907de804.6f8218"]]},{"id":"658c34db.9a73cc","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":120,"wires":[]},{"id":"35118228.caee7e","type":"postcode-exists","z":"234c0ab5.dcb3f6","name":"","postcode":"SE1 8NW","x":320,"y":120,"wires":[["658c34db.9a73cc"]]},{"id":"f69b314a.0964d","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":120,"wires":[["35118228.caee7e"]]},{"id":"bb0ef066.44f11","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":180,"wires":[]},{"id":"5c5637a2.a3a9c8","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":180,"wires":[["d48436e6.2b7bc8"]]},{"id":"d48436e6.2b7bc8","type":"postcode-near","z":"234c0ab5.dcb3f6","name":"Near LatLng","postcode":"","latitude":"51.50638918393","longitude":"-0.104104688222098","location":"51.50638918393,-0.104104688222098","locationType":"geocode","x":310,"y":180,"wires":[["bb0ef066.44f11"]]},{"id":"2d56e78f.d2a918","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":300,"wires":[]},{"id":"7cdb60c2.8324a","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":300,"wires":[["546e37c8.ab91c8"]]},{"id":"546e37c8.ab91c8","type":"postcode-random","z":"234c0ab5.dcb3f6","name":"","x":330,"y":300,"wires":[["2d56e78f.d2a918"]]},{"id":"94159a92.2b06b8","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":240,"wires":[]},{"id":"7bb504e6.ca991c","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":240,"wires":[["b30f0cca.9bf24"]]},{"id":"b30f0cca.9bf24","type":"postcode-near","z":"234c0ab5.dcb3f6","name":"Near Postcode","postcode":"SE1 8NW","latitude":"","longitude":"","location":"SE1 8NW","locationType":"postcode","x":320,"y":240,"wires":[["94159a92.2b06b8"]]},{"id":"bbbfd60e.5b6e08","type":"inject","z":"234c0ab5.dcb3f6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":360,"wires":[["f4656747.b669f8"]]},{"id":"9257bd39.f660c","type":"debug","z":"234c0ab5.dcb3f6","name":"","active":true,"console":"false","complete":"payload","x":630,"y":360,"wires":[]},{"id":"f4656747.b669f8","type":"postcode-reverse-geocode","z":"234c0ab5.dcb3f6","name":"","latitude":"51.50638918393","longitude":"-0.104104688222098","x":330,"y":360,"wires":[["9257bd39.f660c"]]}]