Reference
Object loaders

Object Loaders

Requests for data to the Xweather Weather API from within your application can be made using a series of object loaders. These loaders automatically handle requesting and parsing the responses and return object models back to your application, preventing you from having to worry about API response property/format changes, parsing the data and handling of storing the loaded responses.

You simply create an instance of one or more of the available object loaders, make the request with the necessary API parameters and your application will be notified once the framework has successfully loaded your requested data. All data will be returned to you as an array of object model that are tied to an object loader, allowing you to simply access properties on object models when using Xweather data throughout your application.

The following object loaders are currently available:

Object LoaderDescriptionObject ModelCallback Interface
AdvisoriesTaskRequests active weather advisories (watches/warnings) for a particular location.
API Endpoint: alerts (opens in a new tab)
AdvisoriesResponseAdvisoriesTaskCallback
AirQualityTaskThe Air Quality API endpoint provides current information for locations globally. Observed air quality will be interpolated data or specific station observation data depending on the query action. This endpoint includes the air quality index (AQI), category, dominant pollutant, and information for primary pollutants when available.
API Endpoint: airquality (opens in a new tab)
AirQualityResponseAirQualityTaskCallback
CountriesTaskRequests profile data for countries, including the full name, abbreviations, capital, population area, and neighboring countries.
API Endpoint: countries (opens in a new tab)
CountriesResponseCountriesTaskCallback
EarthquakesTaskRequests recent earthquake data globally.
API Endpoint: earthquakes (opens in a new tab)
EarthquakesResponseEarthquakesTaskCallback
FiresTaskRequests active wildfire data near a particular location or within a defined region.
API Endpoint: fires (opens in a new tab)
FiresResponseFiresTaskCallback
ForecastsTaskRequests extended forecast information for a particular location, extending out to 15 days.
API Endpoint: forecasts (opens in a new tab)
ForecastsResponseForecastsTaskCallback
MoonphasesTaskRequests moon phase calendar information, such as the next full, new and quarter moon phases.
API Endpoint: sunmoon/moonphases (opens in a new tab)
MoonphasesResponseMoonphasesTaskCallback
NormalsStationsTaskThe stations that normals are derived from.
API Endpoint: normals/stations (opens in a new tab)
NormStationsResponseNormalsStationsTaskCallback
NormalsTaskRequests daily climate normals for a station or close to a particular location, such as normal max/min temperature, normal precipitation and normal snowfall.
API Endpoint: normals (opens in a new tab)
NormalsResponseNormalsTaskCallback
ObservationsArchiveTaskRequest all observations for a station that were reported on a given day.
API Endpoint: observations/archive (opens in a new tab)
ObArchiveResponseObservationsArchiveTaskCallback
ObservationsSummaryTaskThe observations/summary endpoint provides access to daily summaries based on received observations.
API Endpoint: observations/summary (opens in a new tab)
ObSummaryResponseObservationsSummaryTaskCallback
ObservationsTaskRequests weather observations for a particular location.
API Endpoint: observations (opens in a new tab)
ObservationResponseObservationsTaskCallback
PlacesAirportsTaskRequests information for airports.
API Endpoint: places/airports (opens in a new tab)
PlacesAirportsResponsePlacesAirportsTaskCallback
PlacesPostalcodesTaskRequests information about particular US and Canadian Postal Codes.
API Endpoint: places/postalcodes (opens in a new tab)
PostalcodesResponsePlacesPostalcodesTaskCallback
PlacesTaskRequests information about a particular location, such as latitude/longitude position, population, zip codes, alternate names, timezone, elevation, etc.
API Endpoint: places (opens in a new tab)
PlacesResponsePlacesTaskCallback
RiversGaugesTaskThe rivers/gauges endpoint provides access to enhanced information for the river and lake gauges utilized within the rivers endpoint. The primary source the gauge information is the NOAA Advanced Hydrologic Prediction Service (AHPS). Gauge information will include location information and when available recent crests, historical crests and flood impacts.

***Although listed as RiversGaugesTask, this endpoint uses the RiverTask class, the RiversResponse model and the RiversTaskCallback class. The same response is returned, except when the gauges endpoint is called the additional details will be provided as listed in the river/gauges endpoint documentation.***
API Endpoint: rivers/gauges (opens in a new tab)
RiversResponseRiversTaskCallback
RiversTaskThe rivers endpoint provides access to the latest river and lakes gauge observations. The primary source of this gauge observations is the NOAA Advanced Hydrologic Prediction Service (AHPS). The gauge observations include information on the current water level or flow, flood stages, and low water thresholds.
API Endpoint: rivers (opens in a new tab)
RiversResponseRiversTaskCallback
StormCellsTaskRequests storm cell observation and forecast data near a particular location or within a defined region.
API Endpoint: stormcells (opens in a new tab)
StormCellResponseStormCellsTaskCallback
StormReportsTaskRequests severe storm report data, such as rainfall totals, wind damage and hail reports, near a particular location or within a defined region.
API Endpoint: stormreports (opens in a new tab)
StormReportsResponseStormReportsTaskCallback
SunmoonTaskRequests solar and lunar information for a particular place and time frame, such as sunrise/set, twilight, moon rise/set and moon phase.
API Endpoint: sunmoon (opens in a new tab)
SunmoonResponseSunmoonTaskCallback
TidesStationsTaskRequest information on tidal observation locations.
API Endpoint: tides/stations (opens in a new tab)
TideStationsResponseTidesStationsTaskCallback
TidesTaskRequests tide forecast information for a specific station or for stations closest to a location.
API Endpoint: tides (opens in a new tab)
TidesResponseTidesTaskCallback
TropicalCyclonesTaskThe tropicalcyclones endpoint provides access to information on the active tropical cyclones, such as invests, tropical depressions, tropical storms, hurricanes, and typhoons, across the globe. Includes information on an individual storms name, position, historical track and forecasts. The tropical API information is based on data from the National Hurricane Center (NHC), Central Pacific Hurricane Center (CPHC), and the Joint Typhoon Warning Center (JTWC).
API Endpoint: tropicalcyclones (opens in a new tab)
TropicalCyclonesResponseTropicalCyclonesTask