Make fake rest api a class