Update api.py
Merge pull request #1 from erikstorm/patch-1

Hmmm.. looks like a great improvement!