consume a json api, minus the boilerplate