Update APIMethods.md

Fixing up the code sections.