(self)
return return_status
Unarchives a sketch and return boolean whether it was successful.
Unarchives a sketch and return boolean whether it was successful.
Unarchives a sketch and return boolean whether it was successful .
def unarchive(self):
        """Unarchives a sketch and return boolean whether it was successful."""
        if not self.is_archived():
            logger.error('Sketch wasn\'t archived.')
            return False

        resource_url = '{0:s}/sketches/{1:d}/archive/'.format(
            self.api.api_root, self.id)
        data = {
            'action': 'unarchive'
        }
        response = self.api.session.post(resource_url, json=data)
        return_status = error.check_return_status(response, logger)

        # return_status = True means unarchive is successful or that
        # the archive status is False.
        self._archived = not return_status
        return return_status
def unarchive ( self ) : if not self . is_archived ( ) : logger . error ( 'Sketch wasn\'t archived.' ) return False resource_url = '{0:s}/sketches/{1:d}/archive/' . format ( self . api . api_root , self . id ) data = { 'action' : 'unarchive' } response = self . api . session . post ( resource_url , json = data ) return_status = error . check_return_status ( response , logger ) # return_status = True means unarchive is successful or that # the archive status is False. self . _archived = not return_status return return_status