noaa_nws_adapter 0.0.4 copy "noaa_nws_adapter: ^0.0.4" to clipboard
noaa_nws_adapter: ^0.0.4 copied to clipboard

NOAA / NWS direct-consume wrapper — smallest-slice GeoJSON client for api.weather.gov active winter alerts by point. Pure Dart.

example/main.dart

// ignore_for_file: avoid_print
//
// Minimal example for noaa_nws_adapter.
//
// Demonstrates constructing the NoaaNwsClient. The publisher (NWS)
// requires every request to carry a User-Agent of the form
// "(myappname.com, contact@email.com)" — the adapter does NOT default
// a User-Agent; constructing without one is a programmer error and
// raises ArgumentError up-front rather than 403-ing later.

import 'package:noaa_nws_adapter/noaa_nws_adapter.dart';

void main() {
  final client = NoaaNwsClient(
    userAgent: '(myapp.example.com, contact@example.com)',
  );
  print('NWS API base: ${client.apiBase}');
  print('Accept header: ${client.acceptHeader}');
  print('Winter event types catalogued: ${kNwsWinterEventTypes.length}');
  client.close();
}
0
likes
160
points
213
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

NOAA / NWS direct-consume wrapper — smallest-slice GeoJSON client for api.weather.gov active winter alerts by point. Pure Dart.

Repository (GitHub)
View/report issues
Contributing

Topics

#weather #noaa #nws #winter-driving #alerts

License

BSD-3-Clause (license)

Dependencies

equatable, http

More

Packages that depend on noaa_nws_adapter