<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> __license__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' [ <NUM_LIT:11> : - <NUM_LIT:2> ] <EOL> import re <EOL> try : <EOL> from xml . etree import cElementTree as ElementTree <EOL> except ImportError : <EOL> try : <EOL> import cElementTree as ElementTree <EOL> except ImportError : <EOL> try : <EOL> from xml . etree import ElementTree <EOL> except ImportError : <EOL> from elementtree import ElementTree <EOL> import atom <EOL> import gdata <EOL> import gdata . media as Media , gdata . exif as Exif , gdata . geo as Geo <EOL> PHOTOS_NAMESPACE = '<STR_LIT>' <EOL> MEDIA_NAMESPACE = '<STR_LIT>' <EOL> EXIF_NAMESPACE = '<STR_LIT>' <EOL> OPENSEARCH_NAMESPACE = '<STR_LIT>' <EOL> GEO_NAMESPACE = '<STR_LIT>' <EOL> GML_NAMESPACE = '<STR_LIT>' <EOL> GEORSS_NAMESPACE = '<STR_LIT>' <EOL> PHEED_NAMESPACE = '<STR_LIT>' <EOL> BATCH_NAMESPACE = '<STR_LIT>' <EOL> class PhotosBaseElement ( atom . AtomBase ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> _namespace = PHOTOS_NAMESPACE <EOL> _children = atom . AtomBase . _children . copy ( ) <EOL> _attributes = atom . AtomBase . _attributes . copy ( ) <EOL> def __init__ ( self , name = None , extension_elements = None , <EOL> extension_attributes = None , text = None ) : <EOL> self . name = name <EOL> self . text = text <EOL> self . extension_elements = extension_elements or [ ] <EOL> self . extension_attributes = extension_attributes or { } <EOL> def __int__ ( self ) : <EOL> return int ( self . text ) <EOL> def bool ( self ) : <EOL> return self . text == '<STR_LIT:true>' <EOL> class GPhotosBaseFeed ( gdata . GDataFeed , gdata . LinkFinder ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> _namespace = atom . ATOM_NAMESPACE <EOL> _attributes = gdata . GDataFeed . _attributes . copy ( ) <EOL> _children = gdata . GDataFeed . _children . copy ( ) <EOL> del _children [ '<STR_LIT>' % atom . ATOM_NAMESPACE ] <EOL> def __init__ ( self , author = None , category = None , contributor = None , <EOL> generator = None , icon = None , atom_id = None , link = None , logo = None , <EOL> rights = None , subtitle = None , title = None , updated = None , <EOL> entry = None , total_results = None , start_index = None , <EOL> items_per_page = None , extension_elements = None , <EOL> extension_attributes = None , text = None ) : <EOL> gdata . GDataFeed . __init__ ( self , author = author , category = category , <EOL> contributor = contributor , generator = generator , <EOL> icon = icon , atom_id = atom_id , link = link , <EOL> logo = logo , rights = rights , subtitle = subtitle , <EOL> title = title , updated = updated , entry = entry , <EOL> total_results = total_results , <EOL> start_index = start_index , <EOL> items_per_page = items_per_page , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> text = text ) <EOL> def kind ( self ) : <EOL> "<STR_LIT>" <EOL> try : <EOL> return self . category [ <NUM_LIT:0> ] . term . split ( '<STR_LIT:#>' ) [ <NUM_LIT:1> ] <EOL> except IndexError : <EOL> return None <EOL> def _feedUri ( self , kind ) : <EOL> "<STR_LIT>" <EOL> assert ( kind in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:user>' ) ) <EOL> here_href = self . GetSelfLink ( ) . href <EOL> if '<STR_LIT>' % kind in here_href : <EOL> return here_href <EOL> if not '<STR_LIT>' in here_href : <EOL> sep = '<STR_LIT:?>' <EOL> if '<STR_LIT:?>' in here_href : sep = '<STR_LIT:&>' <EOL> return here_href + "<STR_LIT>" % ( sep , kind ) <EOL> rx = re . match ( '<STR_LIT>' , here_href ) <EOL> return here_href [ : rx . end ( <NUM_LIT:1> ) ] + kind + here_href [ rx . end ( <NUM_LIT:2> ) : ] <EOL> def _ConvertElementTreeToMember ( self , child_tree ) : <EOL> """<STR_LIT>""" <EOL> category = child_tree . find ( '<STR_LIT>' % atom . ATOM_NAMESPACE ) <EOL> if category is None : <EOL> return atom . AtomBase . _ConvertElementTreeToMember ( self , child_tree ) <EOL> namespace , kind = category . get ( '<STR_LIT>' ) . split ( '<STR_LIT:#>' ) <EOL> if namespace != PHOTOS_NAMESPACE : <EOL> return atom . AtomBase . _ConvertElementTreeToMember ( self , child_tree ) <EOL> entry_class = getattr ( gdata . photos , '<STR_LIT>' % kind . title ( ) ) <EOL> if not hasattr ( self , '<STR_LIT>' ) or self . entry is None : <EOL> self . entry = [ ] <EOL> self . entry . append ( atom . _CreateClassFromElementTree ( <EOL> entry_class , child_tree ) ) <EOL> class GPhotosBaseEntry ( gdata . GDataEntry , gdata . LinkFinder ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> _kind = '<STR_LIT>' <EOL> _namespace = atom . ATOM_NAMESPACE <EOL> _children = gdata . GDataEntry . _children . copy ( ) <EOL> _attributes = gdata . GDataEntry . _attributes . copy ( ) <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , <EOL> extended_property = None , <EOL> extension_elements = None , extension_attributes = None , text = None ) : <EOL> gdata . GDataEntry . __init__ ( self , author = author , category = category , <EOL> content = content , atom_id = atom_id , link = link , <EOL> published = published , title = title , <EOL> updated = updated , text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes ) <EOL> self . category . append ( <EOL> atom . Category ( scheme = '<STR_LIT>' , <EOL> term = '<STR_LIT>' % self . _kind ) ) <EOL> def kind ( self ) : <EOL> "<STR_LIT>" <EOL> try : <EOL> return self . category [ <NUM_LIT:0> ] . term . split ( '<STR_LIT:#>' ) [ <NUM_LIT:1> ] <EOL> except IndexError : <EOL> return None <EOL> def _feedUri ( self , kind ) : <EOL> "<STR_LIT>" <EOL> try : <EOL> href = self . GetFeedLink ( ) . href <EOL> except AttributeError : <EOL> return None <EOL> sep = '<STR_LIT:?>' <EOL> if '<STR_LIT:?>' in href : sep = '<STR_LIT:&>' <EOL> return '<STR_LIT>' % ( href , sep , kind ) <EOL> class PhotosBaseEntry ( GPhotosBaseEntry ) : <EOL> pass <EOL> class PhotosBaseFeed ( GPhotosBaseFeed ) : <EOL> pass <EOL> class GPhotosBaseData ( object ) : <EOL> pass <EOL> class Access ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def AccessFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Access , xml_string ) <EOL> class Albumid ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def AlbumidFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Albumid , xml_string ) <EOL> class BytesUsed ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def BytesUsedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( BytesUsed , xml_string ) <EOL> class Client ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def ClientFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Client , xml_string ) <EOL> class Checksum ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def ChecksumFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Checksum , xml_string ) <EOL> class CommentCount ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def CommentCountFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( CommentCount , xml_string ) <EOL> class CommentingEnabled ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def CommentingEnabledFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( CommentingEnabled , xml_string ) <EOL> class Height ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def HeightFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Height , xml_string ) <EOL> class Id ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:id>' <EOL> def IdFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Id , xml_string ) <EOL> class Location ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:location>' <EOL> def LocationFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Location , xml_string ) <EOL> class MaxPhotosPerAlbum ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def MaxPhotosPerAlbumFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( MaxPhotosPerAlbum , xml_string ) <EOL> class Name ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:name>' <EOL> def NameFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Name , xml_string ) <EOL> class Nickname ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def NicknameFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Nickname , xml_string ) <EOL> class Numphotos ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def NumphotosFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Numphotos , xml_string ) <EOL> class Numphotosremaining ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def NumphotosremainingFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Numphotosremaining , xml_string ) <EOL> class Position ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def PositionFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Position , xml_string ) <EOL> class Photoid ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def PhotoidFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Photoid , xml_string ) <EOL> class Quotacurrent ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def QuotacurrentFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Quotacurrent , xml_string ) <EOL> class Quotalimit ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def QuotalimitFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Quotalimit , xml_string ) <EOL> class Rotation ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT>' <EOL> def RotationFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Rotation , xml_string ) <EOL> class Size ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:size>' <EOL> def SizeFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Size , xml_string ) <EOL> class Snippet ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def SnippetFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Snippet , xml_string ) <EOL> class Snippettype ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def SnippettypeFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Snippettype , xml_string ) <EOL> class Thumbnail ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def ThumbnailFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Thumbnail , xml_string ) <EOL> class Timestamp ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def isoformat ( self ) : <EOL> """<STR_LIT>""" <EOL> import time <EOL> epoch = float ( self . text ) / <NUM_LIT:1000> <EOL> return time . strftime ( '<STR_LIT>' , time . gmtime ( epoch ) ) <EOL> def datetime ( self ) : <EOL> """<STR_LIT>""" <EOL> import datetime <EOL> epoch = float ( self . text ) / <NUM_LIT:1000> <EOL> return datetime . datetime . fromtimestamp ( epoch ) <EOL> def TimestampFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Timestamp , xml_string ) <EOL> class Truncated ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def TruncatedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Truncated , xml_string ) <EOL> class User ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:user>' <EOL> def UserFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( User , xml_string ) <EOL> class Version ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:version>' <EOL> def VersionFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Version , xml_string ) <EOL> class Width ( PhotosBaseElement ) : <EOL> "<STR_LIT>" <EOL> _tag = '<STR_LIT:width>' <EOL> def WidthFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Width , xml_string ) <EOL> class Weight ( PhotosBaseElement ) : <EOL> """<STR_LIT>""" <EOL> _tag = '<STR_LIT>' <EOL> def WeightFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( Weight , xml_string ) <EOL> class CommentAuthor ( atom . Author ) : <EOL> """<STR_LIT>""" <EOL> _children = atom . Author . _children . copy ( ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:user>' , User ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Nickname ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Thumbnail ) <EOL> def CommentAuthorFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( CommentAuthor , xml_string ) <EOL> class AlbumData ( object ) : <EOL> _children = { } <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Id ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:name>' , Name ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:location>' , Location ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Access ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , BytesUsed ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Timestamp ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Numphotos ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Numphotosremaining ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:user>' , User ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Nickname ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , CommentingEnabled ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , CommentCount ) <EOL> gphoto_id = None <EOL> name = None <EOL> location = None <EOL> access = None <EOL> bytesUsed = None <EOL> timestamp = None <EOL> numphotos = None <EOL> numphotosremaining = None <EOL> user = None <EOL> nickname = None <EOL> commentingEnabled = None <EOL> commentCount = None <EOL> class AlbumEntry ( GPhotosBaseEntry , AlbumData ) : <EOL> """<STR_LIT>""" <EOL> _kind = '<STR_LIT>' <EOL> _children = GPhotosBaseEntry . _children . copy ( ) <EOL> _children . update ( AlbumData . _children . copy ( ) ) <EOL> _children [ '<STR_LIT>' % GEORSS_NAMESPACE ] = ( '<STR_LIT>' , Geo . Where ) <EOL> _children [ '<STR_LIT>' % MEDIA_NAMESPACE ] = ( '<STR_LIT>' , Media . Group ) <EOL> media = Media . Group ( ) <EOL> geo = Geo . Where ( ) <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , <EOL> gphoto_id = None , name = None , location = None , access = None , <EOL> timestamp = None , numphotos = None , user = None , nickname = None , <EOL> commentingEnabled = None , commentCount = None , thumbnail = None , <EOL> media = None , <EOL> geo = None , <EOL> extended_property = None , <EOL> extension_elements = None , extension_attributes = None , text = None ) : <EOL> GPhotosBaseEntry . __init__ ( self , author = author , category = category , <EOL> content = content , atom_id = atom_id , link = link , <EOL> published = published , title = title , <EOL> updated = updated , text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes ) <EOL> self . gphoto_id = gphoto_id <EOL> self . name = name <EOL> self . location = location <EOL> self . access = access <EOL> self . timestamp = timestamp <EOL> self . numphotos = numphotos <EOL> self . user = user <EOL> self . nickname = nickname <EOL> self . commentingEnabled = commentingEnabled <EOL> self . commentCount = commentCount <EOL> self . thumbnail = thumbnail <EOL> self . extended_property = extended_property or [ ] <EOL> self . text = text <EOL> self . media = media or Media . Group ( ) <EOL> self . geo = geo or Geo . Where ( ) <EOL> def GetAlbumId ( self ) : <EOL> "<STR_LIT>" <EOL> return self . GetFeedLink ( ) . href . split ( '<STR_LIT:/>' ) [ - <NUM_LIT:1> ] <EOL> def GetPhotosUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetCommentsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetTagsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def AlbumEntryFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( AlbumEntry , xml_string ) <EOL> class AlbumFeed ( GPhotosBaseFeed , AlbumData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseFeed . _children . copy ( ) <EOL> _children . update ( AlbumData . _children . copy ( ) ) <EOL> def GetPhotosUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetTagsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetCommentsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def AlbumFeedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( AlbumFeed , xml_string ) <EOL> class PhotoData ( object ) : <EOL> _children = { } <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Id ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Albumid ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Checksum ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Client ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Height ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Position ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Rotation ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:size>' , Size ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Timestamp ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:version>' , Version ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:width>' , Width ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , CommentingEnabled ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , CommentCount ) <EOL> _children [ '<STR_LIT>' % EXIF_NAMESPACE ] = ( '<STR_LIT>' , Exif . Tags ) <EOL> _children [ '<STR_LIT>' % GEORSS_NAMESPACE ] = ( '<STR_LIT>' , Geo . Where ) <EOL> _children [ '<STR_LIT>' % MEDIA_NAMESPACE ] = ( '<STR_LIT>' , Media . Group ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Snippet ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Snippettype ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Truncated ) <EOL> gphoto_id = None <EOL> albumid = None <EOL> checksum = None <EOL> client = None <EOL> height = None <EOL> position = None <EOL> rotation = None <EOL> size = None <EOL> timestamp = None <EOL> version = None <EOL> width = None <EOL> commentingEnabled = None <EOL> commentCount = None <EOL> snippet = None <EOL> snippettype = None <EOL> truncated = None <EOL> media = Media . Group ( ) <EOL> geo = Geo . Where ( ) <EOL> tags = Exif . Tags ( ) <EOL> class PhotoEntry ( GPhotosBaseEntry , PhotoData ) : <EOL> """<STR_LIT>""" <EOL> _kind = '<STR_LIT>' <EOL> _children = GPhotosBaseEntry . _children . copy ( ) <EOL> _children . update ( PhotoData . _children . copy ( ) ) <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , text = None , <EOL> gphoto_id = None , albumid = None , checksum = None , client = None , height = None , <EOL> position = None , rotation = None , size = None , timestamp = None , version = None , <EOL> width = None , commentCount = None , commentingEnabled = None , <EOL> media = None , <EOL> exif = None , <EOL> geo = None , <EOL> extension_elements = None , extension_attributes = None ) : <EOL> GPhotosBaseEntry . __init__ ( self , author = author , category = category , <EOL> content = content , <EOL> atom_id = atom_id , link = link , published = published , <EOL> title = title , updated = updated , text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes ) <EOL> self . gphoto_id = gphoto_id <EOL> self . albumid = albumid <EOL> self . checksum = checksum <EOL> self . client = client <EOL> self . height = height <EOL> self . position = position <EOL> self . rotation = rotation <EOL> self . size = size <EOL> self . timestamp = timestamp <EOL> self . version = version <EOL> self . width = width <EOL> self . commentingEnabled = commentingEnabled <EOL> self . commentCount = commentCount <EOL> self . media = media or Media . Group ( ) <EOL> self . exif = exif or Exif . Tags ( ) <EOL> self . geo = geo or Geo . Where ( ) <EOL> def GetPostLink ( self ) : <EOL> "<STR_LIT>" <EOL> return self . GetFeedLink ( ) <EOL> def GetCommentsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetTagsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetAlbumUri ( self ) : <EOL> """<STR_LIT>""" <EOL> href = self . GetSelfLink ( ) . href <EOL> return href [ : href . find ( '<STR_LIT>' ) ] <EOL> def PhotoEntryFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( PhotoEntry , xml_string ) <EOL> class PhotoFeed ( GPhotosBaseFeed , PhotoData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseFeed . _children . copy ( ) <EOL> _children . update ( PhotoData . _children . copy ( ) ) <EOL> def GetTagsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetCommentsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def PhotoFeedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( PhotoFeed , xml_string ) <EOL> class TagData ( GPhotosBaseData ) : <EOL> _children = { } <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Weight ) <EOL> weight = None <EOL> class TagEntry ( GPhotosBaseEntry , TagData ) : <EOL> """<STR_LIT>""" <EOL> _kind = '<STR_LIT>' <EOL> _children = GPhotosBaseEntry . _children . copy ( ) <EOL> _children . update ( TagData . _children . copy ( ) ) <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , <EOL> weight = None , <EOL> extended_property = None , <EOL> extension_elements = None , extension_attributes = None , text = None ) : <EOL> GPhotosBaseEntry . __init__ ( self , author = author , category = category , <EOL> content = content , <EOL> atom_id = atom_id , link = link , published = published , <EOL> title = title , updated = updated , text = text , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes ) <EOL> self . weight = weight <EOL> def GetAlbumUri ( self ) : <EOL> """<STR_LIT>""" <EOL> href = self . GetSelfLink ( ) . href <EOL> pos = href . find ( '<STR_LIT>' ) <EOL> if pos == - <NUM_LIT:1> : <EOL> return None <EOL> return href [ : pos ] <EOL> def GetPhotoUri ( self ) : <EOL> """<STR_LIT>""" <EOL> href = self . GetSelfLink ( ) . href <EOL> pos = href . find ( '<STR_LIT>' ) <EOL> if pos == - <NUM_LIT:1> : <EOL> return None <EOL> return href [ : pos ] <EOL> def TagEntryFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( TagEntry , xml_string ) <EOL> class TagFeed ( GPhotosBaseFeed , TagData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseFeed . _children . copy ( ) <EOL> _children . update ( TagData . _children . copy ( ) ) <EOL> def TagFeedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( TagFeed , xml_string ) <EOL> class CommentData ( GPhotosBaseData ) : <EOL> _children = { } <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Id ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Albumid ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Photoid ) <EOL> _children [ '<STR_LIT>' % atom . ATOM_NAMESPACE ] = ( '<STR_LIT>' , [ CommentAuthor , ] ) <EOL> gphoto_id = None <EOL> albumid = None <EOL> photoid = None <EOL> author = None <EOL> class CommentEntry ( GPhotosBaseEntry , CommentData ) : <EOL> """<STR_LIT>""" <EOL> _kind = '<STR_LIT>' <EOL> _children = GPhotosBaseEntry . _children . copy ( ) <EOL> _children . update ( CommentData . _children . copy ( ) ) <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , <EOL> gphoto_id = None , albumid = None , photoid = None , <EOL> extended_property = None , <EOL> extension_elements = None , extension_attributes = None , text = None ) : <EOL> GPhotosBaseEntry . __init__ ( self , author = author , category = category , <EOL> content = content , <EOL> atom_id = atom_id , link = link , published = published , <EOL> title = title , updated = updated , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> text = text ) <EOL> self . gphoto_id = gphoto_id <EOL> self . albumid = albumid <EOL> self . photoid = photoid <EOL> def GetCommentId ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . GetSelfLink ( ) . href . split ( '<STR_LIT:/>' ) [ - <NUM_LIT:1> ] <EOL> def GetAlbumUri ( self ) : <EOL> """<STR_LIT>""" <EOL> href = self . GetSelfLink ( ) . href <EOL> return href [ : href . find ( '<STR_LIT>' ) ] <EOL> def GetPhotoUri ( self ) : <EOL> """<STR_LIT>""" <EOL> href = self . GetSelfLink ( ) . href <EOL> return href [ : href . find ( '<STR_LIT>' ) ] <EOL> def CommentEntryFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( CommentEntry , xml_string ) <EOL> class CommentFeed ( GPhotosBaseFeed , CommentData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseFeed . _children . copy ( ) <EOL> _children . update ( CommentData . _children . copy ( ) ) <EOL> def CommentFeedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( CommentFeed , xml_string ) <EOL> class UserData ( GPhotosBaseData ) : <EOL> _children = { } <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , MaxPhotosPerAlbum ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Nickname ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Quotalimit ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Quotacurrent ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Thumbnail ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT:user>' , User ) <EOL> _children [ '<STR_LIT>' % PHOTOS_NAMESPACE ] = ( '<STR_LIT>' , Id ) <EOL> maxPhotosPerAlbum = None <EOL> nickname = None <EOL> quotalimit = None <EOL> quotacurrent = None <EOL> thumbnail = None <EOL> user = None <EOL> gphoto_id = None <EOL> class UserEntry ( GPhotosBaseEntry , UserData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseEntry . _children . copy ( ) <EOL> _children . update ( UserData . _children . copy ( ) ) <EOL> _kind = '<STR_LIT:user>' <EOL> def __init__ ( self , author = None , category = None , content = None , <EOL> atom_id = None , link = None , published = None , <EOL> title = None , updated = None , <EOL> gphoto_id = None , maxPhotosPerAlbum = None , nickname = None , quotalimit = None , <EOL> quotacurrent = None , thumbnail = None , user = None , <EOL> extended_property = None , <EOL> extension_elements = None , extension_attributes = None , text = None ) : <EOL> GPhotosBaseEntry . __init__ ( self , author = author , category = category , <EOL> content = content , <EOL> atom_id = atom_id , link = link , published = published , <EOL> title = title , updated = updated , <EOL> extension_elements = extension_elements , <EOL> extension_attributes = extension_attributes , <EOL> text = text ) <EOL> self . gphoto_id = gphoto_id <EOL> self . maxPhotosPerAlbum = maxPhotosPerAlbum <EOL> self . nickname = nickname <EOL> self . quotalimit = quotalimit <EOL> self . quotacurrent = quotacurrent <EOL> self . thumbnail = thumbnail <EOL> self . user = user <EOL> def GetAlbumsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetPhotosUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetCommentsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetTagsUri ( self ) : <EOL> "<STR_LIT>" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def UserEntryFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( UserEntry , xml_string ) <EOL> class UserFeed ( GPhotosBaseFeed , UserData ) : <EOL> """<STR_LIT>""" <EOL> _children = GPhotosBaseFeed . _children . copy ( ) <EOL> _children . update ( UserData . _children . copy ( ) ) <EOL> def GetAlbumsUri ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetTagsUri ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetPhotosUri ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def GetCommentsUri ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _feedUri ( '<STR_LIT>' ) <EOL> def UserFeedFromString ( xml_string ) : <EOL> return atom . CreateClassFromXMLString ( UserFeed , xml_string ) <EOL> def AnyFeedFromString ( xml_string ) : <EOL> """<STR_LIT>""" <EOL> tree = ElementTree . fromstring ( xml_string ) <EOL> category = tree . find ( '<STR_LIT>' % atom . ATOM_NAMESPACE ) <EOL> if category is None : <EOL> return atom . _CreateClassFromElementTree ( GPhotosBaseFeed , tree ) <EOL> namespace , kind = category . get ( '<STR_LIT>' ) . split ( '<STR_LIT:#>' ) <EOL> if namespace != PHOTOS_NAMESPACE : <EOL> return atom . _CreateClassFromElementTree ( GPhotosBaseFeed , tree ) <EOL> feed_class = getattr ( gdata . photos , '<STR_LIT>' % kind . title ( ) ) <EOL> return atom . _CreateClassFromElementTree ( feed_class , tree ) <EOL> def AnyEntryFromString ( xml_string ) : <EOL> """<STR_LIT>""" <EOL> tree = ElementTree . fromstring ( xml_string ) <EOL> category = tree . find ( '<STR_LIT>' % atom . ATOM_NAMESPACE ) <EOL> if category is None : <EOL> return atom . _CreateClassFromElementTree ( GPhotosBaseEntry , tree ) <EOL> namespace , kind = category . get ( '<STR_LIT>' ) . split ( '<STR_LIT:#>' ) <EOL> if namespace != PHOTOS_NAMESPACE : <EOL> return atom . _CreateClassFromElementTree ( GPhotosBaseEntry , tree ) <EOL> feed_class = getattr ( gdata . photos , '<STR_LIT>' % kind . title ( ) ) <EOL> return atom . _CreateClassFromElementTree ( feed_class , tree ) </s>
