resource.py -> apiresource.py
Sample and Annotate code now inherits corresponding API classes