#NEWLINE# def list_locations( self ) : #NEWLINE# #INDENT# 'Return available locations.' #NEWLINE# params = { #NEWLINE# #INDENT# 'f' : 'json' , #NEWLINE# #UNINDENT# } #NEWLINE# if self . key : #NEWLINE# #INDENT# params [ 'k' ] = self . key #NEWLINE# #UNINDENT# request = requests . get ( '{0}/getLocations.php' . format ( self . wpt_url ) , params = params ) #NEWLINE# locations = request . json ( ) [ 'data' ] #NEWLINE# return sorted ( locations . keys ( ) )