Improved API example.