Started new API methodology

api.js and api.html