#NEWLINE# @ pretty #NEWLINE# @ scene_type #NEWLINE# @ workspace #NEWLINE# @ cli . command ( 'search' ) #NEWLINE# @ click . argument ( 'aoi' , default = '@-' , required = False ) #NEWLINE# @ limit_option ( 1000 ) #NEWLINE# @ click . option ( '--where' , nargs = 3 , multiple = True , help = 'Provide additional search criteria. See https://www.planet.com/docs/v0/scenes/#metadata for search metadata fields.' ) #NEWLINE# @ click . option ( '--aoi_id' , help = 'Provider the identifier of an uploaded geometry' ) #NEWLINE# def get_scenes_list( scene_type , pretty , aoi , limit , where , workspace , aoi_id ) : #NEWLINE# #INDENT# 'Get a list of scenes.' #NEWLINE# aoi = read_aoi ( aoi ) #NEWLINE# conditions = { #NEWLINE# #INDENT# 'workspace' : workspace , #NEWLINE# #UNINDENT# } #NEWLINE# conditions = { #NEWLINE# #INDENT# 'aoi_id' : aoi_id , #NEWLINE# #UNINDENT# } #NEWLINE# if where : #NEWLINE# #INDENT# conditions . update ( [ ( ( '%s.%s' % condition [ 0 : 2 ] ) , condition [ 2 ] ) for condition in where ] ) #NEWLINE# #UNINDENT# echo_json_response ( call_and_wrap ( client ( ) . get_scenes_list , scene_type = workspace , intersects = aoi , count = limit , ** conditions ) , pretty , limit = limit )