Test Mode 1

The parameter 'test' by itself parrots that value back. This can be used to verify that you are able to successfully connect to the API.

Example Link:

http://api.parfait.snarkybox.com/current?test=true

What that link returns will look like this if viewed in a browser:

true

Test Mode 2

Adding the parameter 'icao' will dump the full data array converted from the XML sent by NOAA, plus parrot back a table of all the possible parameters and their current values in a simple HTML web page. Information on how to find the ICAO code can be found here.

Example Link:

http://api.parfait.snarkybox.com/current?icao=klax&test=true

What that link returns will look like this if viewed in a browser:


<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>
<current_observation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
  <credit>NOAA's National Weather Service</credit>
  <credit_URL>http://weather.gov/</credit_URL>
  <image>
    <url>http://weather.gov/images/xml_logo.gif</url>
    <title>NOAA's National Weather Service</title>
    <link>http://weather.gov</link>
  </image>
  <suggested_pickup>15 minutes after the hour</suggested_pickup>
  <suggested_pickup_period>60</suggested_pickup_period>
  <location>Los Angeles Intl Airport, CA</location>
  <station_id>KLAX</station_id>
  <latitude>33.94</latitude>
  <longitude>-118.4</longitude>
  <observation_time>Last Updated on Dec 27 2013, 9:53 pm PST</observation_time>
  <observation_time_rfc822>Fri, 27 Dec 2013 21:53:00 -0800</observation_time_rfc822>
  <weather>Mostly Cloudy</weather>
  <temperature_string>64.0 F (17.8 C)</temperature_string>
  <temp_f>64.0</temp_f>
  <temp_c>17.8</temp_c>
  <relative_humidity>40</relative_humidity>
  <wind_string>Calm</wind_string>
  <wind_dir>North</wind_dir>
  <wind_degrees>0</wind_degrees>
  <wind_mph>0.0</wind_mph>
  <wind_kt>0</wind_kt>
  <pressure_string>1017.9 mb</pressure_string>
  <pressure_mb>1017.9</pressure_mb>
  <pressure_in>30.07</pressure_in>
  <dewpoint_string>39.0 F (3.9 C)</dewpoint_string>
  <dewpoint_f>39.0</dewpoint_f>
  <dewpoint_c>3.9</dewpoint_c>
  <visibility_mi>10.00</visibility_mi>
  <icon_url_base>http://forecast.weather.gov/images/wtf/small/</icon_url_base>
  <two_day_history_url>http://www.weather.gov/data/obhistory/KLAX.html</two_day_history_url>
  <icon_url_name>nbkn.png</icon_url_name>
  <ob_url>http://www.weather.gov/data/METAR/KLAX.1.txt</ob_url>
  <disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
  <copyright_url>http://weather.gov/disclaimer.html</copyright_url>
  <privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>
</current_observation>

http://w1.weather.gov/xml/current_obs/KLAX.xml

icao element layer test version
KLAX     true 2017.10.08.24