moved api module into ig-api.js