[flickrpy] r52 committed - Fixed issue 14. Now the URL is available in the flickr.photos.getInfo ...

0 views
Skip to first unread message

flic...@googlecode.com

unread,
Feb 3, 2011, 4:02:41 PM2/3/11
to flickrp...@googlegroups.com
Revision: 52
Author: vacariu.v
Date: Thu Feb 3 13:01:53 2011
Log: Fixed issue 14. Now the URL is available in the flickr.photos.getInfo
method response, there is a Photo.url attribute, but I left the
Photo.getURL() function so that older code still works.
http://code.google.com/p/flickrpy/source/detail?r=52

Modified:
/trunk/flickr.py

=======================================
--- /trunk/flickr.py Thu Feb 3 12:22:29 2011
+++ /trunk/flickr.py Thu Feb 3 13:01:53 2011
@@ -61,14 +61,15 @@
'owner', 'dateposted', 'datetaken', 'takengranularity',
'title', 'description', 'ispublic', 'isfriend', 'isfamily',
'cancomment', 'canaddmeta', 'comments', 'tags', 'permcomment',
- 'permaddmeta']
+ 'permaddmeta', 'url']

#XXX: Hopefully None won't cause problems
def __init__(self, id, owner=None, dateuploaded=None, \
title=None, description=None, ispublic=None, \
isfriend=None, isfamily=None, cancomment=None, \
canaddmeta=None, comments=None, tags=None, secret=None, \
- isfavorite=None, server=None, farm=None, license=None,
rotation=None):
+ isfavorite=None, server=None, farm=None, license=None, \
+ rotation=None, url=None):
"""Must specify id, rest is optional."""
self.__loaded = False
self.__cancomment = cancomment
@@ -95,6 +96,7 @@
self.__takengranularity = None
self.__permcomment = None
self.__permaddmeta = None
+ self.__url = None

def __setattr__(self, key, value):
if key in self.__class__.__readonly:
@@ -146,6 +148,8 @@
self.__cancomment = photo.editability.cancomment
self.__canaddmeta = photo.editability.canaddmeta
self.__comments = photo.comments.text
+ self.__url = photo.urls.url.text
+

try:
self.__permcomment = photo.permissions.permcomment

Reply all
Reply to author
Forward
0 new messages