Update index.js

Added missing prototype for getting title from api.