#NEWLINE# @ classmethod #NEWLINE# def _post( cls , args ) : #NEWLINE# #INDENT# api . _timeout = args . timeout #NEWLINE# format = args . format #NEWLINE# graphs = cls . graphs #NEWLINE# if ( args . graphs is None ) : #NEWLINE# #INDENT# graphs = sys . stdin . read ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# graphs = json . loads ( graphs ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise Exception ( 'bad json parameter' ) #NEWLINE# #UNINDENT# res = api . Timeboard . create ( title = args . title , description = args . description , graphs = [ graphs ] , template_variables = args . template_variables ) #NEWLINE# report_warnings ( res ) #NEWLINE# report_errors ( res ) #NEWLINE# if ( format == 'pretty' ) : #NEWLINE# #INDENT# print ( pretty_json ( res ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( json . dumps ( res ) )