spin.js and API