Break up API client into per-resource client and common code