#NEWLINE# def get_index( self ) : #NEWLINE# #INDENT# if ( self . _api_index is None ) : #NEWLINE# #INDENT# url = ( self . mirror . rstrip ( '/' ) + '/index.json' ) #NEWLINE# try : #NEWLINE# #INDENT# with network . get_file ( url ) as f : #NEWLINE# #INDENT# self . _api_index = load_json ( f ) #NEWLINE# #UNINDENT# #UNINDENT# except ResourceNotFound : #NEWLINE# #INDENT# raise NetworkError ( ( "API index not found at '%s'" % self ) ) #NEWLINE# #UNINDENT# #UNINDENT# return self . _api_index