Initialize an APIObject with the given name and make it available
        using dot notation from the top-level namespace.

def add_object(self, name, obj):
        """
        Initialize an APIObject with the given name and make it available
        using dot notation from the top-level namespace.
        """
        if iskeyword(name):
            name = '_' + name
        setattr(self, name, APIObject(self, **obj))
        self._objects[name] = getattr(self, name)