add class for work with api, add cli options