def get_all_stations(self, station_type=None):
        """Returns information of all stations.
        @param<optional> station_type: ['mainline', 'suburban', 'dart']
        """
        params = None
        if station_type and station_type in STATION_TYPE_TO_CODE_DICT:
            url = self.api_base_url + 'getAllStationsXML_WithStationType'
            params = {
                'stationType': STATION_TYPE_TO_CODE_DICT[station_type]
            }
        else:
            url = self.api_base_url + 'getAllStationsXML'

        response = requests.get(
            url, params=params, timeout=10)

        if response.status_code != 200:
            return []

        return self._parse_station_list(response.content)
def get_all_stations ( self , station_type = None ) : params = None if station_type and station_type in STATION_TYPE_TO_CODE_DICT : url = self . api_base_url + 'getAllStationsXML_WithStationType' params = { 'stationType' : STATION_TYPE_TO_CODE_DICT [ station_type ] } else : url = self . api_base_url + 'getAllStationsXML' response = requests . get ( url , params = params , timeout = 10 ) if response . status_code != 200 : return [ ] return self . _parse_station_list ( response . content )
Returns information of all stations.
        @param<optional> station_type: ['mainline', 'suburban', 'dart']