Update api.methods.js