Enforce main thread for api calls.
Merge pull request #443 from square/dimitris/enforce

Enforce main thread for api calls.