Update apiWrapper.py

change apiWrapper so can deal with JSON