2017 © Pedro Peláez
 

library metno

MET.no API library for fetching weather forecast

image

pion/metno

MET.no API library for fetching weather forecast

  • Wednesday, April 11, 2018
  • by pionl
  • Repository
  • 1 Watchers
  • 1 Stars
  • 113 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

MET.no forecast library

Small library for getting forecast for given coordinates. Updated to newest API, originally made in 2012., (*1)

Endpoint: http://api.met.no/weatherapi/ Endpoint version: 1.8, (*2)

Usage

Basic usage you can find in example.php, (*3)

You can install this library via composer or download the classes and to load all the classes you can use loader_METno.php, (*4)

Add to composer require, (*5)

"pion/metno": ">=1.0.0"

For best clean of cached xml files use a cron with sh script like this (delete files older than 1 day):, (*6)

find _METcache/ -mtime +1 -type f -delete

METnoDay

This class represents the forecast for the day. It has several properties you can access. By default the symbol and values is taken from the highest temperature, you can also set the hour which should be used., (*7)

The day has also forecast for every day (represented by METnoForecast class). When API has missing hour, the parsing will ensure that the hour will be filled by previous/next value., (*8)

Also you can access night forecast, hour forecast for highest or lowest temperature., (*9)

Custom settings

All custom settings can be made in METnoFactory via setters. You can change the class of the symbol (representing the forecast icon) and percipitation (representing values), (*10)

TODO

Possible features that could be made, (*11)

METno

  • info abaout location, should be added to METnoDay too
  • time by location
  • detection of night by sunset (currently detection is made by hour)

METnoDay

  • mornig forecast
  • correct hour symbol from the form

The Versions

11/04 2018

dev-master

9999999-dev

MET.no API library for fetching weather forecast

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

weather forecast met.no

23/08 2016

dev-feature/json_support

dev-feature/json_support

MET.no API library for fetching weather forecast

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

weather forecast met.no

31/03 2016

dev-develop

dev-develop

MET.no API library for fetching weather forecast

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

weather forecast met.no

23/06 2015

1.0.1

1.0.1.0

MET.no API library for fetching weather forecast

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

weather forecast met.no

02/06 2015

1.0.0

1.0.0.0

MET.no API library for fetching weather forecast

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

weather forecast met.no