#NEWLINE# def project_info_2( self , project_id ) : #NEWLINE# #INDENT# print ( '' ) #NEWLINE# print ( 'Well done. You have completed your first Orchestra project!' ) #NEWLINE# self . pause ( 2 ) #NEWLINE# print ( "Let's verify that your rating was stored successfully by using Orchestra's API to check the project info again." ) #NEWLINE# self . pause ( 2 ) #NEWLINE# print ( 'As a reminder, the API call looks like this:' ) #NEWLINE# print ( '' ) #NEWLINE# print ( 'get_project_information(project_id)' ) #NEWLINE# print ( '' ) #NEWLINE# self . pause ( 2 ) #NEWLINE# ( complete , rating ) = self . get_rating_info ( 'Press enter when you are ready to make the API call and print out the resulting JSON data. ' , project_id ) #NEWLINE# while ( not rating ) : #NEWLINE# #INDENT# print ( "Uh oh! It looks like the task did not get completed (see 'tasks.rate.status' in the output above.)" ) #NEWLINE# self . pause ( 2 ) #NEWLINE# ( complete , rating ) = self . get_rating_info ( 'Press enter to try again, or CTRL-C to exit. ' , project_id ) #NEWLINE# #UNINDENT# print ( "Task complete! Note that 'tasks.rate.status' is 'Complete' in the output above." ) #NEWLINE# self . pause ( 2 ) #NEWLINE# if ( not rating ) : #NEWLINE# #INDENT# print ( "Uh oh! Looks like you submitted the task without rating the image. (see 'tasks.rate.latest_data' in the output above.)" ) #NEWLINE# self . pause ( 2 ) #NEWLINE# print ( 'We probably should have validated that :-)' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( "Note that 'tasks.rate.latest_data.rating' is set to '{}', the rating you selected." . format ( rating ) ) #NEWLINE# #UNINDENT# self . pause ( 4 )