<s> from . import InstanceResource , ListResource <EOL> from . util import normalize_dates , parse_date <EOL> class Media ( InstanceResource ) : <EOL> """<STR_LIT>""" <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . parent . delete_instance ( self . name ) <EOL> class MediaList ( ListResource ) : <EOL> name = "<STR_LIT>" <EOL> key = "<STR_LIT>" <EOL> instance = Media <EOL> def __call__ ( self , message_sid ) : <EOL> base_uri = "<STR_LIT>" % ( self . base_uri , message_sid ) <EOL> return MediaList ( base_uri , self . auth , self . timeout ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( MediaList , self ) . __init__ ( * args , ** kwargs ) <EOL> @ normalize_dates <EOL> def list ( self , before = None , after = None , date_created = None , ** kw ) : <EOL> """<STR_LIT>""" <EOL> kw [ "<STR_LIT>" ] = before <EOL> kw [ "<STR_LIT>" ] = after <EOL> kw [ "<STR_LIT>" ] = parse_date ( date_created ) <EOL> return self . get_instances ( kw ) <EOL> def delete ( self , sid ) : <EOL> """<STR_LIT>""" <EOL> return self . delete_instance ( sid ) </s>
