added a getdata method which can query the API or return example results