A simple example on how to extend WP-API.