@@ -9,24 +9,6 @@ This library is neither maintained by OpenWeatherMap nor their official PHP API.
99[ ![ Scrutinizer Quality Score] ( https://scrutinizer-ci.com/g/cmfcmf/OpenWeatherMap-PHP-Api/badges/quality-score.png?s=f31ca08aa8896416cf162403d34362f0a5da0966 )] ( https://scrutinizer-ci.com/g/cmfcmf/OpenWeatherMap-PHP-Api/ )
1010[ ![ Code Coverage] ( https://scrutinizer-ci.com/g/cmfcmf/OpenWeatherMap-PHP-Api/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/cmfcmf/OpenWeatherMap-PHP-Api/?branch=master )
1111[ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/0addfb24-e2b4-4feb-848e-86b2078ca104/big.png )] ( https://insight.sensiolabs.com/projects/0addfb24-e2b4-4feb-848e-86b2078ca104 )
12- -----------
13-
14- For example code and how to use this API, please take a look into
15- ` Examples_*.php ` files and open them in your browser.
16- - ` Examples_Current.php ` Shows how to receive the current weather.
17- - ` Examples_Forecast.php ` Shows how to receive weather forecasts.
18- - ` Examples_History.php ` Shows how to receive weather history.
19- - ` Examples_Cache.php ` Shows how to implement a cache.
20-
21-
22- Contribute!
23- ===========
24- I'm happy about every ** pull request** or ** issue** you find and open to help
25- making this API ** more awesome** .
26-
27- You can use [ Vagrant] ( https://vagrantup.com ) to kick-start your development.
28- Simply run ` vagrant up ` , ` vagrant ssh ` and ` cd ` into ` /vagrant ` to start
29- developing.
3012
3113Installation
3214============
@@ -51,22 +33,36 @@ $lang = 'de';
5133// Units (can be 'metric' or 'imperial' [default]):
5234$units = 'metric';
5335
54- // Get OpenWeatherMap object. Don't use caching (take a look into Example_Cache .php to see how it works).
36+ // Get OpenWeatherMap object. Don't use caching (take a look into Examples/Cache .php to see how it works).
5537$owm = new OpenWeatherMap();
5638
5739try {
5840 $weather = $owm->getWeather('Berlin', $units, $lang);
5941} catch(OWMException $e) {
6042 echo 'OpenWeatherMap exception: ' . $e->getMessage() . ' (Code ' . $e->getCode() . ').';
61- echo "<br />\n";
6243} catch(\Exception $e) {
6344 echo 'General exception: ' . $e->getMessage() . ' (Code ' . $e->getCode() . ').';
64- echo "<br />\n";
6545}
6646
6747echo $weather->temperature;
6848```
6949
50+ For more example code and instructions on how to use this library, please take
51+ a look into the ` Examples ` folder.
52+ - ` CurrentWeather.php ` Shows how to receive the current weather.
53+ - ` WeatherForecast.php ` Shows how to receive weather forecasts.
54+ - ` WeatherHistory.php ` Shows how to receive weather history.
55+ - ` Cache.php ` Shows how to implement and use a cache.
56+
57+ Contribute!
58+ ===========
59+ I'm happy about every ** pull request** or ** issue** you find and open to help
60+ making this API ** more awesome** .
61+
62+ You can use [ Vagrant] ( https://vagrantup.com ) to kick-start your development.
63+ Simply run ` vagrant up ` , ` vagrant ssh ` and ` cd ` into ` /vagrant ` to start
64+ developing.
65+
7066License
7167=======
7268MIT — Please see the [ LICENSE file] ( https://github.com/Cmfcmf/OpenWeatherMap-PHP-Api/blob/master/LICENSE )
0 commit comments