def rename_mapobject_type(self, name, new_name):
        '''Renames a mapobject type.

        Parameters
        ----------
        name: str
            name of the mapobject type that should be renamed
        new_name: str
            name that should be given to the mapobject type

        See also
        --------
        :func:`tmserver.api.mapobject.update_mapobject_type`
        :class:`tmlib.models.mapobject.MapobjectType`
        '''
        logger.info(
            'rename mapobject type "%s" of experiment "%s"',
            name, self.experiment_name
        )
        content = {'name': new_name}
        mapobject_type_id = self._get_mapobject_type_id(name)
        url = self._build_api_url(
            '/experiments/{experiment_id}/mapobject_types/{mapobject_type_id}'.format(
                experiment_id=self._experiment_id,
                mapobject_type_id=mapobject_type_id
            )
        )
        res = self._session.put(url, json=content)
        res.raise_for_status()
def rename_mapobject_type ( self , name , new_name ) : logger . info ( 'rename mapobject type "%s" of experiment "%s"' , name , self . experiment_name ) content = { 'name' : new_name } mapobject_type_id = self . _get_mapobject_type_id ( name ) url = self . _build_api_url ( '/experiments/{experiment_id}/mapobject_types/{mapobject_type_id}' . format ( experiment_id = self . _experiment_id , mapobject_type_id = mapobject_type_id ) ) res = self . _session . put ( url , json = content ) res . raise_for_status ( )
Renames a mapobject type.

        Parameters
        ----------
        name: str
            name of the mapobject type that should be renamed
        new_name: str
            name that should be given to the mapobject type

        See also
        --------
        :func:`tmserver.api.mapobject.update_mapobject_type`
        :class:`tmlib.models.mapobject.MapobjectType`