Returns details for a specific airport.

        .. code-block:: python

            amadeus.reference_data.location('ALHR').get()

        :rtype: amadeus.Response
        :raises amadeus.ResponseError: if the request could not be completed
190719
def get(self, **params):
        '''
        
        '''
        return self.client.get('/v1/reference-data/locations/{0}'
                               .format(self.location_id), **params)
11260
def location(ip=None, key=None, field=None):
    '''  
    '''

    if field and (field not in field_list):
        return 'Invalid field'

    if field:
        if ip:
            url = 'https://ipapi.co/{}/{}/'.format(ip, field)
        else:
            url = 'https://ipapi.co/{}/'.format(field)
    else:
        if ip:
            url = 'https://ipapi.co/{}/json/'.format(ip)
        else:
            url = 'https://ipapi.co/json/'

    if key or API_KEY:
        url = '{}?key={}'.format(url, (key or API_KEY))

    response = get(url, headers=headers)

    if field:
        return response.text
    else:
        return response.json()
90945
def get(self):
        
        params = self.param_dict_builder.params
        logger.debug(pprint.pformat(format(params)))
        response = requests.post(SSOS_URL,
                                 data=params,
                                 headers=self.headers)
        logger.debug(response.url)
        assert isinstance(response, requests.Response)
        assert (response.status_code == requests.codes.ok)

        lines = response.content
        # note: spelling 'occured' is in SSOIS
        if len(lines) < 2 or "An error occured getting the ephemeris" in lines:
            print lines
            print response.url
            raise IOError(os.errno.EACCES,
                          "call to SSOIS failed on format error")

        if os.access("backdoor.tsv", os.R_OK):
            lines += open("backdoor.tsv").read()
        return lines
288617
def get_place_details(api_key, place_id, **kwargs):
    

    params = {
        'placeid': place_id,
        'key': api_key,
        }

    resp = requests.get(url=DETAIL_GOOGLEMAPS_API_URL, params=params)

    if resp.status_code >= 300:
        raise Exception('Bad status code rerieved from google api')

    data = json.loads(resp.text)

    # check api response status codess
    check_response_code(data)

    detail = data.get("result", {})

    place_identifier = "{} {}".format(detail.get("name"), detail.get("formatted_address"))

    detail_json = {
        "id": detail.get("place_id"),
        "name": detail.get("name"),
        "address": detail.get("formatted_address"),
        "types": detail.get("types"),
        "coordinates": detail.get("geometry", {}).get("location")
    }

    detail_json = add_optional_parameters(
        detail_json, detail,
        *get_populartimes_from_search(place_identifier, **kwargs)
    )

    return detail_json
407545
def get(self, req, driver):
        
        response = driver.get_network(req.params, id)
        data = {
            'action': "get",
            'controller': "network",
            'id': id,
            'cloud': req.environ['calplus.cloud'],
            'response': response
        }
        return data
892595
def get(self, max=None, timeout=None, wait=None):
        
        response = self.reserve(max, timeout, wait)
        return response
1218881
def get_location (host):
    
    if geoip is None:
        # no geoip available
        return None
    try:
        record = get_geoip_record(host)
    except (geoip_error, socket.error):
        log.debug(LOG_PLUGIN, "Geoip error for %r", host, exception=True)
        # ignore lookup errors
        return None
    value = u""
    if record and record.get("city"):
        value += unicode_safe(record["city"])
    if record and record.get("country_name"):
        if value:
            value += u", "
        value += unicode_safe(record["country_name"])
    return value
226795
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ReservationInstance(
            self._version,
            payload,
            workspace_sid=self._solution['workspace_sid'],
            task_sid=self._solution['task_sid'],
            sid=self._solution['sid'],
        )
408444
def _get(self, uri, options):
        
        url = "http://%s/%s" % (self.host, uri)
        r = requests.get(url, params=options)
        if r.status_code == 200:
            data = r.json()
            return data['results']
        else:
            # Throws anything not 200 error
            r.raise_for_status()
1019638
def get_station_id(self):
        '''
        
        '''
        extra_opts = '/pws:0' if not self.use_pws else ''
        api_url = GEOLOOKUP_URL % (self.api_key,
                                   extra_opts,
                                   self.location_code)
        response = self.api_request(api_url)
        station_type = 'pws' if self.use_pws else 'airport'
        try:
            stations = response['location']['nearby_weather_stations']
            nearest = stations[station_type]['station'][0]
        except (KeyError, IndexError):
            raise Exception(
                'No locations matched location_code %s' % self.location_code)

        self.logger.error('nearest = %s', nearest)
        if self.use_pws:
            nearest_pws = nearest.get('id', '')
            if not nearest_pws:
                raise Exception('No id entry for nearest PWS')
            self.station_id = 'pws:%s' % nearest_pws
        else:
            nearest_airport = nearest.get('icao', '')
            if not nearest_airport:
                raise Exception('No icao entry for nearest airport')
            self.station_id = 'icao:%s' % nearest_airport
1031007
def fetch(self, station: str) -> str:
        
        valid_station(station)
        try:
            resp = getattr(requests, self.method.lower())(self.url.format(self.rtype, station))
            if resp.status_code != 200:
                raise SourceError(f'{self.__class__.__name__} server returned {resp.status_code}')
        except requests.exceptions.ConnectionError:
            raise ConnectionError(f'Unable to connect to {self.__class__.__name__} server')
        report = self._extract(resp.text, station)
        # This split join replaces all *whitespace elements with a single space
        return ' '.join(report.split())
608707
function( options, callback ) {

    var self = this
    var url = '/ratings/rest/v1/json/flight/' + options.carrier + '/' + options.flightNumber

    var extensions = []

    if( Array.isArray( options.extendedOptions ) ) {
      extensions = extensions.concat( options.extendedOptions )
    }

    return this._clientRequest({
      url: url,
      extendedOptions: extensions,
      qs: {
        departureAirport: options.departureAirport,
        codeType: options.codeType,
      }
    }, function( error, data ) {
      callback.call( self, error, data )
    })

  }
611692
def destinations(stop):
    """"""
    from pyruter.api import Departures

    async def get_destinations():
        """Get departure information."""
        async with aiohttp.ClientSession() as session:
            data = Departures(LOOP, stop, session=session)
            result = await data.get_final_destination()
            print(json.dumps(result, indent=4, sort_keys=True,
                             ensure_ascii=False))
    LOOP.run_until_complete(get_destinations())
440747
async def get(self, zone_id: int, *, details: bool = False) -> dict:
        """"""
        endpoint = 'zone/{0}'.format(zone_id)
        if details:
            endpoint += '/properties'
        return await self._request('get', endpoint)
453980
def _get(self, url):
        
        try:
            response = requests.get(url, verify=self.verify,
                                    cookies=self.cookies, timeout=self.timeout,
                                    auth=self._client.auth())
            response.raise_for_status()
            return response
        except HTTPError as exc:
            if exc.response.status_code in (404, 407):
                raise EntityNotFound(url)
            else:
                message = ('Error during request: {url} '
                           'status code:({code}) '
                           'message: {message}').format(
                               url=url,
                               code=exc.response.status_code,
                               message=exc.response.text)
                logging.error(message)
                raise ServerError(exc.response.status_code,
                                  exc.response.text,
                                  message)
        except Timeout:
            message = 'Request timed out: {url} timeout: {timeout}'
            message = message.format(url=url, timeout=self.timeout)
            logging.error(message)
            raise ServerError(message)
        except RequestException as exc:
            message = ('Error during request: {url} '
                       'message: {message}').format(
                           url=url,
                           message=exc)
            logging.error(message)
            raise ServerError(exc.args[0][1].errno,
                              exc.args[0][1].strerror,
                              message)
251356
def get_reservations(self, email, date, timeout=None):
        
        try:
            resp = self._request("GET", "/1.1/space/bookings?email={}&date={}&limit=100".format(email, date), timeout=timeout)
        except resp.exceptions.HTTPError as error:
            raise APIError("Server Error: {}".format(error))
        except requests.exceptions.ConnectTimeout:
            raise APIError("Timeout Error")
        return resp.json()
698107
def get_location(self, ip, detailed=False):
        
        seek = self._get_pos(ip)

        if seek > 0:
            return self._parse_location(seek, detailed=detailed)

        return False