Using singleton api class for communication to api