GithubHelp home page GithubHelp logo

thtroyer / noaa-cap-alerts Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 114 KB

Fetches and parses NOAA CAP alerts

Home Page: https://packagist.org/packages/thtroyer/noaa-cap-alerts

License: MIT License

PHP 100.00%
php noaa noaa-data noaa-weather weather-information severe-weather weather-alerts noaa-api

noaa-cap-alerts's Introduction

thtroyer/noaa-cap-alerts

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License

What is this?

This is a PHP 7.3+ library to make it easier to fetch and use weather alerts created by NOAA.

Setup

Include noaa-cap-alerts into your project:

composer require thtroyer/noaa-cap-alerts
composer update

Dependencies

Make sure you have the XML extension installed for PHP.

e.g. sudo apt install php7.4-xml

Usage

Instantiate a new NoaaCapAlerts\NoaaAlerts object. Calling getAlerts() will download the latest alerts from NOAA, parse and return a set of data objects to be consumed.

$noaaAlerts = new NoaaCapAlerts\NoaaAlerts();
$alerts = $noaaAlerts->getAlerts();

foreach ($alerts as $alert) {
    echo $alert->getTitle();
}

See NoaaCapAlerts\Model\NoaaAlert class to see what data is currently available.

Features are still being added, so some changes may not be backwards compatible. Until 1.0, treat new feature versions (0.x) as breaking updates.

More information about NOAA's CAP format is available here.

noaa-cap-alerts's People

Contributors

thtroyer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

noaa-cap-alerts's Issues

Modernize?

Evaluate if application needs to be updated to latest PHP versions or left at 7.1+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.