def __init__(self, cfg): WeatherFinder.__init__(self) APIRequest.__init__(self, cfg, 'openweathermap', 'OpenWeatherMap query') self.weather_url = 'http://api.openweathermap.org/data/2.5/' self.celsius = True if cfg['weather']['units'] == 'celsius' else False self.suffix = cfg['weather']['suffix'] self.load(cfg['weather']['dictionary'])
def __init__(self, cfg): DirectionsFinder.__init__(self) APIRequest.__init__(self, cfg, 'google-directions', 'Google directions query') self.directions_url = 'https://maps.googleapis.com/maps/api/directions/json' if 'key' in cfg['DM']['directions'].keys(): self.api_key = cfg['DM']['directions']['key'] else: self.api_key = None
def __init__(self, cfg): WeatherFinder.__init__(self) APIRequest.__init__(self, cfg, "openweathermap", "OpenWeatherMap query") self.weather_url = "http://api.openweathermap.org/data/2.5/" self.celsius = True if cfg["weather"]["units"] == "celsius" else False self.suffix = cfg["weather"]["suffix"] self.load(cfg["weather"]["dictionary"])
def __init__(self, cfg): DirectionsFinder.__init__(self) APIRequest.__init__(self, cfg, 'crws-directions', 'CRWS directions query') # create the client self.client = Client("http://crws.timetable.cz/CR.svc?wsdl") # obtain user information self.user_id = cfg['CRWS']['user_id'] self.user_desc = cfg['CRWS']['user_desc'] self.max_connections_count = cfg['CRWS']['max_connections_count'] self.file_dir = os.path.dirname(os.path.abspath(__file__)) # renew list of lists self.combinations = self._load_combination_info() self.default_comb_id = self.combinations[0]['_sID'] # parse list of lists and get ID of cities list and stop names list self.city_list_id, self.stops_list_for_city = self._get_stop_list_ids() # load mapping from ALEX stops to IDOS stops and back self.mapping, self.reverse_mapping = self._load_stops_mapping()
def __init__(self, cfg): APIRequest.__init__(self, cfg, 'openweathermap', 'OpenWeatherMap query')
def __init__(self, cfg): DirectionsFinder.__init__(self) APIRequest.__init__(self, cfg, 'google-directions', 'Google directions query') self.directions_url = 'http://maps.googleapis.com/maps/api/directions/json'
def __init__(self, cfg): WeatherFinder.__init__(self) APIRequest.__init__(self, cfg, 'openweathermap', 'OpenWeatherMap query') self.weather_url = 'http://api.openweathermap.org/data/2.5/'