public
Description: A Python wrapper to the Phanfare API
Homepage: http://altmansoftware.lighthouseapp.com/projects/10199-pyphanfare/overview
Clone URL: git://github.com/paltman/pyphanfare.git
Click here to lend your support to: pyphanfare and make a donation at www.pledgie.com !
pyphanfare / all_images.py
afc88325 » paltman 2008-08-21 added sample file 1 from pyphanfare.connection import PhanfareConnection
2
3 def list_all():
4 filesize = 0
5 c = PhanfareConnection()
6 c.authenticate()
7 albums = c.account.get_albums()
8
9 for album in albums:
10 print album.name
11 images = album.get_images(external_links=True, num_images=2000)
12 for i in range(0, len(images)):
13 for r in images[i].renditions:
14 if r['rendition_type'] == 'Full':
15 typ = 'I'
16 if images[i].is_video:
17 typ = 'V'
18 print '%s - %s - %s - %s' % (i, typ, str(images[i].image_date), r['url'])
19 filesize += r['filesize']
20 print ''
21 print 'Total in storage at Phanfare: %s' % filesize
22
23 list_all()