Made getApi an object method