An exercise in APIs