Logo Search packages:      
Sourcecode: gallery-uploader version File versions  Download package

def guplib::gallery::Gallery::new_album (   self,

Create a new album

Definition at line 330 of file gallery.py.

00330                                                               :
        '''Create a new album'''
        (status, data) = self.request('new-album', '2.1', {
            'g2_form[set_albumName]': album_parent,
            'g2_form[newAlbumName]': album_name,
            'g2_form[newAlbumTitle]': album_title,
            'g2_form[newAlbumDesc]': ''})

        if status is None:
            raise ConnectionError

        if not status == 0:
            raise self._return_codes[status]

        for info in data:
            if info[0] == 'album_name':
                logging.debug('Created album "%s"', info[1])
                return int(info[1])

        return None

    def add_item(self, album, filename):

Generated by  Doxygen 1.6.0   Back to index