class PhotoData(object): _children = {'{%s}id' % PHOTOS_NAMESPACE: ('gphoto_id', Id), '{%s}albumid' % PHOTOS_NAMESPACE: ('albumid', Albumid), '{%s}checksum' % PHOTOS_NAMESPACE: ('checksum', Checksum), '{%s}client' % PHOTOS_NAMESPACE: ('client', Client), '{%s}height' % PHOTOS_NAMESPACE: ('height', Height), '{%s}position' % PHOTOS_NAMESPACE: ('position', Position), '{%s}rotation' % PHOTOS_NAMESPACE: ('rotation', Rotation), '{%s}size' % PHOTOS_NAMESPACE: ('size', Size), '{%s}timestamp' % PHOTOS_NAMESPACE: ('timestamp', Timestamp), '{%s}version' % PHOTOS_NAMESPACE: ('version', Version), '{%s}width' % PHOTOS_NAMESPACE: ('width', Width), '{%s}commentingEnabled' % PHOTOS_NAMESPACE: ('commentingEnabled', CommentingEnabled), '{%s}commentCount' % PHOTOS_NAMESPACE: ('commentCount', CommentCount), '{%s}tags' % EXIF_NAMESPACE: ('exif', Exif.Tags), '{%s}where' % GEORSS_NAMESPACE: ('geo', Geo.Where), '{%s}group' % MEDIA_NAMESPACE: ('media', Media.Group), '{%s}snippet' % PHOTOS_NAMESPACE: ('snippet', Snippet), '{%s}snippettype' % PHOTOS_NAMESPACE: ('snippettype', Snippettype), '{%s}truncated' % PHOTOS_NAMESPACE: ('truncated', Truncated)} ## NOTE: storing photo:id as self.gphoto_id, to avoid name clash with atom:id ## NOTE: storing media:group as self.media, exif:tags as self.exif, and ## geo:where as self.geo, to create a self-explaining api # These elements show up in search feeds gphoto_id = None albumid = None checksum = None client = None height = None position = None rotation = None size = None timestamp = None version = None width = None commentingEnabled = None commentCount = None snippet = None snippettype = None truncated = None media = Media.Group() geo = Geo.Where() tags = Exif.Tags()
def __init__(self, author=None, category=None, content=None, atom_id=None, link=None, published=None, title=None, updated=None, text=None, # GPHOTO NAMESPACE: gphoto_id=None, albumid=None, checksum=None, client=None, height=None, position=None, rotation=None, size=None, timestamp=None, version=None, width=None, commentCount=None, commentingEnabled=None, # MEDIARSS NAMESPACE: media=None, # EXIF_NAMESPACE: exif=None, # GEORSS NAMESPACE: geo=None, extension_elements=None, extension_attributes=None): GPhotosBaseEntry.__init__(self, author=author, category=category, content=content, atom_id=atom_id, link=link, published=published, title=title, updated=updated, text=text, extension_elements=extension_elements, extension_attributes=extension_attributes) ## NOTE: storing photo:id as self.gphoto_id, to avoid name clash with atom:id self.gphoto_id = gphoto_id self.albumid = albumid self.checksum = checksum self.client = client self.height = height self.position = position self.rotation = rotation self.size = size self.timestamp = timestamp self.version = version self.width = width self.commentingEnabled = commentingEnabled self.commentCount = commentCount ## NOTE: storing media:group as self.media, to create a self-explaining api self.media = media or Media.Group() self.exif = exif or Exif.Tags() self.geo = geo or Geo.Where()