@@ -63,8 +63,8 @@ def _args_to_payload(self, *args, **kwargs):
6363 The lower wavelength for the spectrum in appropriate units.
6464 maxwav : `astropy.units.Quantity` object
6565 The upper wavelength for the spectrum in appropriate units.
66- linename : str, optional
67- The spectrum to fetch. Defaults to "H I"
66+ linename : str or list , optional
67+ The spectrum/spectra to fetch. Defaults to "H I"
6868 energy_level_unit : str, optional
6969 The energy level units must be one of the following:
7070 'R', 'Rydberg', 'rydberg', 'cm', 'cm-1', 'EV', 'eV',
@@ -85,7 +85,13 @@ def _args_to_payload(self, *args, **kwargs):
8585
8686 """
8787 request_payload = {}
88- request_payload ["spectra" ] = kwargs ['linename' ]
88+ linename = kwargs ["linename" ]
89+ if isinstance (linename , str ):
90+ request_payload ["spectra" ] = linename
91+ elif isinstance (linename , list ):
92+ request_payload ["spectra" ] = " " .join (linename )
93+ else :
94+ raise TypeError ("linename must str or list" )
8995 (min_wav , max_wav , wav_unit ) = _parse_wavelength (args [0 ], args [1 ])
9096 request_payload ["low_wl" ] = min_wav
9197 request_payload ["upp_wl" ] = max_wav
0 commit comments