use public hook methods in api class