Initial API code commit

Signed-off-by: Ross Gallagher <ross_gallagher@rossgallagher.co.uk>