Added generic query client API method. Fixes #25