added `gzip_default` to api.py, added `ooapi.py` which is a class-based version of the same