Update 'ref/templates/api.txt'.

Note that because there are some places where indent-level was changed,
it's hard to read the diff directly (using -w option can help though).
Merge pull request #331 from sgryjp/ref_templates_api

Update 'ref/templates/api.txt'.