#NEWLINE# def similar( names = None , ids = None , start = 0 , results = 15 , buckets = None , limit = False , max_familiarity = None , min_familiarity = None , max_hotttnesss = None , min_hotttnesss = None , seed_catalog = None , artist_start_year_before = None , artist_start_year_after = None , artist_end_year_before = None , artist_end_year_after = None ) : #NEWLINE# #INDENT# "Return similar artists to this one\n    \n    Args:\n    \n    Kwargs:\n        ids (str/list): An artist id or list of ids\n        \n        names (str/list): An artist name or list of names\n        \n        results (int): An integer number of results to return\n        \n        buckets (list): A list of strings specifying which buckets to retrieve\n        \n        limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets\n        \n        start (int): An integer starting value for the result set\n        \n        max_familiarity (float): A float specifying the max familiarity of artists to search for\n        \n        min_familiarity (float): A float specifying the min familiarity of artists to search for\n        \n        max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for\n        \n        min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for\n        \n        seed_catalog (str): A string specifying the catalog similar artists are restricted to\n    \n    Returns:\n        A list of similar Artist objects\n    \n    Example:\n\n    >>> some_dudes = [artist.Artist('weezer'), artist.Artist('radiohead')]\n    >>> some_dudes\n    [<artist - Weezer>, <artist - Radiohead>]\n    >>> sims = artist.similar(ids=[art.id for art in some_dudes], results=5)\n    >>> sims\n    [<artist - The Smashing Pumpkins>, <artist - Biffy Clyro>, <artist - Death Cab for Cutie>, <artist - Jimmy Eat World>, <artist - Nerf Herder>]\n    >>> \n\n    " #NEWLINE# buckets = ( buckets or [ ] ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ids : #NEWLINE# #INDENT# if ( not isinstance ( ids , list ) ) : #NEWLINE# #INDENT# ids = [ ids ] #NEWLINE# #UNINDENT# kwargs [ 'id' ] = ids #NEWLINE# #UNINDENT# if names : #NEWLINE# #INDENT# if ( not isinstance ( names , list ) ) : #NEWLINE# #INDENT# names = [ names ] #NEWLINE# #UNINDENT# kwargs [ 'name' ] = names #NEWLINE# #UNINDENT# if ( max_familiarity is not None ) : #NEWLINE# #INDENT# kwargs [ 'max_familiarity' ] = max_familiarity #NEWLINE# #UNINDENT# if ( min_familiarity is not None ) : #NEWLINE# #INDENT# kwargs [ 'min_familiarity' ] = min_familiarity #NEWLINE# #UNINDENT# if ( max_hotttnesss is not None ) : #NEWLINE# #INDENT# kwargs [ 'max_hotttnesss' ] = max_hotttnesss #NEWLINE# #UNINDENT# if ( min_hotttnesss is not None ) : #NEWLINE# #INDENT# kwargs [ 'min_hotttnesss' ] = min_hotttnesss #NEWLINE# #UNINDENT# if ( seed_catalog is not None ) : #NEWLINE# #INDENT# kwargs [ 'seed_catalog' ] = seed_catalog #NEWLINE# #UNINDENT# if start : #NEWLINE# #INDENT# kwargs [ 'start' ] = start #NEWLINE# #UNINDENT# if results : #NEWLINE# #INDENT# kwargs [ 'results' ] = results #NEWLINE# #UNINDENT# if buckets : #NEWLINE# #INDENT# kwargs [ 'bucket' ] = buckets #NEWLINE# #UNINDENT# if limit : #NEWLINE# #INDENT# kwargs [ 'limit' ] = 'true' #NEWLINE# #UNINDENT# if artist_start_year_before : #NEWLINE# #INDENT# kwargs [ 'artist_start_year_before' ] = artist_start_year_before #NEWLINE# #UNINDENT# if artist_start_year_after : #NEWLINE# #INDENT# kwargs [ 'artist_start_year_after' ] = artist_start_year_after #NEWLINE# #UNINDENT# if artist_end_year_before : #NEWLINE# #INDENT# kwargs [ 'artist_end_year_before' ] = artist_end_year_before #NEWLINE# #UNINDENT# if artist_end_year_after : #NEWLINE# #INDENT# kwargs [ 'artist_end_year_after' ] = artist_end_year_after #NEWLINE# #UNINDENT# result = util . callm ( ( '%s/%s' % ( 'artist' , 'similar' ) ) , kwargs ) #NEWLINE# return [ Artist ( ** util . fix ( a_dict ) ) for a_dict in result [ 'response' ] [ 'artists' ] ]