#NEWLINE# def do_events( request ) : #NEWLINE# #INDENT# service = str ( request . GET . get ( 'service' , 'all' ) ) #NEWLINE# if ( service == 'all' ) : #NEWLINE# #INDENT# events = get_all_event_names ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# events = get_event_names ( service = events ) #NEWLINE# #UNINDENT# results = [ [ 'Event Name' ] ] #NEWLINE# for event in events : #NEWLINE# #INDENT# results . append ( [ event [ 'event' ] ] ) #NEWLINE# #UNINDENT# return rsp ( json . dumps ( results ) )