Replacing the mock API with the real API service