Add api.Connection class