def add(self, objs):
        """
        Adds the given `objs` to this `LinkCollection`.

        - **objs** can be a list of :py:class:`.PanoptesObject` instances, a
          list of object IDs, a single :py:class:`.PanoptesObject` instance, or
          a single object ID.

        Examples::

            organization.links.projects.add(1234)
            organization.links.projects.add(Project(1234))
            workflow.links.subject_sets.add([1,2,3,4])
            workflow.links.subject_sets.add([Project(12), Project(34)])
        """

        if self.readonly:
            raise NotImplementedError(
                '{} links can\'t be modified'.format(self._slug)
            )

        if not self._parent.id:
            raise ObjectNotSavedException(
                "Links can not be modified before the object has been saved."
            )

        _objs = [obj for obj in self._build_obj_list(objs) if obj not in self]
        if not _objs:
            return

        self._parent.http_post(
            '{}/links/{}'.format(self._parent.id, self._slug),
            json={self._slug: _objs},
            retry=True,
        )
        self._linked_object_ids.extend(_objs)
def add ( self , objs ) : if self . readonly : raise NotImplementedError ( '{} links can\'t be modified' . format ( self . _slug ) ) if not self . _parent . id : raise ObjectNotSavedException ( "Links can not be modified before the object has been saved." ) _objs = [ obj for obj in self . _build_obj_list ( objs ) if obj not in self ] if not _objs : return self . _parent . http_post ( '{}/links/{}' . format ( self . _parent . id , self . _slug ) , json = { self . _slug : _objs } , retry = True , ) self . _linked_object_ids . extend ( _objs )
Adds the given `objs` to this `LinkCollection`.

        - **objs** can be a list of :py:class:`.PanoptesObject` instances, a
          list of object IDs, a single :py:class:`.PanoptesObject` instance, or
          a single object ID.

        Examples::

            organization.links.projects.add(1234)
            organization.links.projects.add(Project(1234))
            workflow.links.subject_sets.add([1,2,3,4])
            workflow.links.subject_sets.add([Project(12), Project(34)])