<s> """<STR_LIT>""" <EOL> from . trovebox_object import TroveboxObject <EOL> from . photo import Photo <EOL> class Album ( TroveboxObject ) : <EOL> """<STR_LIT>""" <EOL> _type = "<STR_LIT>" <EOL> def __init__ ( self , client , json_dict ) : <EOL> self . photos = None <EOL> self . cover = None <EOL> TroveboxObject . __init__ ( self , client , json_dict ) <EOL> self . _update_fields_with_objects ( ) <EOL> def _update_fields_with_objects ( self ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( self . cover , dict ) : <EOL> self . cover = Photo ( self . _client , self . cover ) <EOL> try : <EOL> for i , photo in enumerate ( self . photos ) : <EOL> if isinstance ( photo , dict ) : <EOL> self . photos [ i ] = Photo ( self . _client , photo ) <EOL> except ( AttributeError , TypeError ) : <EOL> pass <EOL> def cover_update ( self , photo , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . cover_update ( self , photo , ** kwds ) <EOL> self . _replace_fields ( result . get_fields ( ) ) <EOL> self . _update_fields_with_objects ( ) <EOL> def delete ( self , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . delete ( self , ** kwds ) <EOL> self . _delete_fields ( ) <EOL> return result <EOL> def add ( self , objects , object_type = None , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . add ( self , objects , object_type , ** kwds ) <EOL> self . _replace_fields ( result . get_fields ( ) ) <EOL> self . _update_fields_with_objects ( ) <EOL> def remove ( self , objects , object_type = None , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . remove ( self , objects , object_type , <EOL> ** kwds ) <EOL> self . _replace_fields ( result . get_fields ( ) ) <EOL> self . _update_fields_with_objects ( ) <EOL> def update ( self , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . update ( self , ** kwds ) <EOL> self . _replace_fields ( result . get_fields ( ) ) <EOL> self . _update_fields_with_objects ( ) <EOL> def view ( self , ** kwds ) : <EOL> """<STR_LIT>""" <EOL> result = self . _client . album . view ( self , ** kwds ) <EOL> self . _replace_fields ( result . get_fields ( ) ) <EOL> self . _update_fields_with_objects ( ) </s>
