returning self in setApiType