Class: WeatherAlertsService

alk.service.WeatherAlertsService

An instance of this class, given the parameters and defaults, is used to make requests to the PCM WeatherAlertsService.

new alk.service.WeatherAlertsService(opt_options)

This constructor creates a Service object with which to access the ALK Weather Alerts Service.

Option Type Description
apiKey string

This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.

dataset alk.val.Dataset | number | string

The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.

region alk.val.Region | number | string

This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.

srs alk.val.SRS | number | string

This option tells the service the particular projection that is used any GIS data given to the service.

hostURL string

This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

path string

This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

pt1 Array.<number> | string

This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the NorthWest coordinate.

pt2 Array.<number> | string | undefined

This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the SouthEast coordinate.

point Array.<number> | string

TODO: What does point mean for WeatherAlerts.

urgency alk.val.Urgency | number | string

This option specifies a search filter on the Urgency. Default is alk.val.Urgency.All.

severity alk.val.Severity | number | string

This option specifies a search filter on the Severity. Default is alk.val.Severity.All.

certainty alk.val.Certainty | number | string

This option specifies a search filter on the Certainty. Default is alk.val.Certainty.All.

eventNames Array.<string> | string

This option specifies a search filter on the event names, such as ["Winter Storm Warning", "Flood Watch"].

startTime string

The time after which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

endTime string

The time before which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

Extends

Methods

get(opts_or_callback, responseCallback)

This function performs a request for a alkx.WeatherAlertsServiceResponse from the options and defaults set on this alk.service.WeatherAlertsService object.

The response is handled by a asynchronous callback.

Name Type Description
opts_or_callback alkx.WeatherAlertsServiceOptions | null | function

Options override, if not the callback.

Attribute Type Description
apiKey string

This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.

dataset alk.val.Dataset | number | string

The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.

region alk.val.Region | number | string

This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.

srs alk.val.SRS | number | string

This option tells the service the particular projection that is used any GIS data given to the service.

hostURL string

This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

path string

This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.

pt1 Array.<number> | string

This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the NorthWest coordinate.

pt2 Array.<number> | string | undefined

This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the SouthEast coordinate.

point Array.<number> | string

TODO: What does point mean for WeatherAlerts.

urgency alk.val.Urgency | number | string

This option specifies a search filter on the Urgency. Default is alk.val.Urgency.All.

severity alk.val.Severity | number | string

This option specifies a search filter on the Severity. Default is alk.val.Severity.All.

certainty alk.val.Certainty | number | string

This option specifies a search filter on the Certainty. Default is alk.val.Certainty.All.

eventNames Array.<string> | string

This option specifies a search filter on the event names, such as ["Winter Storm Warning", "Flood Watch"].

startTime string

The time after which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

endTime string

The time before which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

responseCallback function

The callback that handles the response.

getAttribution(opts_or_callback, responseCallback){*|undefined} inherited

This method performs a request to this configured service using the supplied options, options set on the constructor, and defaults to get the service's attribution, should it have one. This call results in Object, which may be a parsed JSON response.

Name Type Description
opts_or_callback Object | function

This parameter contains any options that override options that are set on this object for this particular request.

responseCallback function

This parameter is the function that handles the response.

getServiceOptions(options){Object} inherited

This method returns the base options that was used to create this Service object and override them with the given options;

Name Type Description
options Object
Returns:
The combined options.

getURL(opt_options){string} inherited

Returns the URL for the service based on the given options, options set on the constructor, and defaults.

Name Type Description
options Object

These options override any relevant options that are set on the object at its construction.

processResponse(options, obj){Object} inherited

This method processes the response from the server before it gives it to the callback. The default is to pass through.

NOTE

This intercept point will only be called if the request was initiated with the get call.

Name Type Description
options Object

The call options combined with the base options used for the call.

obj Object

The object received from the server.