Universal api query method

Fixes https://github.com/nikwen/forum-app/issues/19