Skip to content

Instantly share code, notes, and snippets.

@stephenkeable-allies
stephenkeable-allies / node-address-lookup.js
Last active March 13, 2019 12:22
Global address lookup with Node JS using PostCoder Web from Allies Computing - https://www.alliescomputing.com/postcoder/address-lookup
/*
PostCoder Web Service V3 example
Allies Computing Ltd 2015
This demo shows how to perform an address lookup in Node JS.
*/
var https = require('https');
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.vb
Last active March 13, 2019 12:22
Example code for using Postcoder Web in VB .NET. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
' PostCoder Web Service V3 example
' Allies Computing Ltd 2013
'
' Demonstrates UK Address lookup rest web service
'
' Product URL: https://www.alliescomputing.com/postcoder/address-lookup
' Technical Specs: https://developers.alliescomputing.com/postcoder-web-api/address-lookup/premise
' Example output: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/address/UK/NR147PZ
'
' This demo shows how to perform an address lookup and parse the results into VB.Net objects.
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.java
Last active March 13, 2019 12:22
Example code for using Postcoder Web in Java. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
// PostCoder Web Service V3 example
// Allies Computing Ltd 2013
//
// Demonstrates UK Address lookup rest web service
//
// Product URL: https://www.alliescomputing.com/postcoder/address-lookup
// Technical Specs: https://developers.alliescomputing.com/postcoder-web-api/address-lookup/premise
// Example output: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/address/UK/NR147PZ
//
// This demo shows how to perform an address lookup and parse the results into Java objects.
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.cs
Last active March 13, 2019 12:22
Example code for using Postcoder Web in C#. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
// PostCoder Web Service V3 example
// Allies Computing Ltd 2013
//
// Demonstrates UK Address lookup rest web service
//
// Product URL: https://www.alliescomputing.com/postcoder/address-lookup
// Technical Specs: https://developers.alliescomputing.com/postcoder-web-api/address-lookup/premise
// Example output: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/address/UK/NR147PZ
//
// This demo shows how to perform an address lookup and parse the results into C# objects.
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.php
Last active March 13, 2019 12:22
Example code for using Postcoder Web in PHP. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
<?php
/*
PostCoder Web Service V3 example
Allies Computing Ltd 2014
Demonstrates UK Address lookup rest web service
Product URL: https://www.alliescomputing.com/postcoder/address-lookup
Technical Specs: https://developers.alliescomputing.com/postcoder-web-api/address-lookup/premise
Example output: http://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/address/UK/NR147PZ
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.rb
Last active March 13, 2019 12:22
Example code for using Postcoder Web in Ruby. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
# PostCoder Web Service V3 example
# Allies Computing Ltd 2014
#
# This demo shows how to perform an address lookup in ruby.
#
# Note: This script has been developed for ruby >= 1.9.3
#
require 'cgi'
require 'json'
@stephenkeable-allies
stephenkeable-allies / postcoder_web_example.py
Last active March 13, 2019 12:22
Example code for using Postcoder Web in Python. For more information on Postcoder Web visit http://www.alliescomputing.com/products/postcoder-web-api
# PostCoder Web Service V3 example
# Allies Computing Ltd 2014
#
# This demo shows how to perform an address lookup in Python.
#
import json
import urllib
searchkey = 'PCW45-12345-12345-1234X'; # Test search key, replace with your
@stephenkeable-allies
stephenkeable-allies / real-time-email-validation.html
Last active May 19, 2016 12:50
Example of how to use the new real-time email validation from Allies Computing (Using Bootstrap and jQuery) - https://www.alliescomputing.com/postcoder/email-validation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Email validation demo</title>
<!-- Bootstrap -->
@stephenkeable-allies
stephenkeable-allies / node-uk-geocoding.js
Last active August 29, 2015 14:22
UK Geocoding with PostCoder Web in Node.js
var https = require('https');
// This is a test API Key which works for the postcode NR14 7PZ
// Get your API Key from www.alliescomputing.com/postcoder/sign-up
var api_key = 'PCW45-12345-12345-1234X';
var postcode = 'NR147PZ';
var headers = {
'Content-Type': 'application/json'
@stephenkeable-allies
stephenkeable-allies / slack_slash_command.php
Last active August 29, 2015 14:18
Address lookup, UK postcode validation, UK geocoding and email validation integration for Slack.
<?php
// Token from slack slash command set up
$token = "YOUR TOKEN";
// API key for PostCoder Web
// Sign up for your API Key at www.alliescomputing.com/postcoder/sign-up
// or use PCW45-12345-12345-1234X, which works with the postcode NR14 7PZ only
$key = "API KEY HERE";