added APICLient and some tests