Java Application that implement an API query and transform this data into a csv file