Add function to client for calling api