Tests added for api calls

api updated with tests

Fixed lint issues

Added some changes

Added tests

Fixed lint