File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,17 @@ use Cmfcmf\OpenWeatherMap;
2525use Cmfcmf\OpenWeatherMap\Exception as OWMException;
2626
2727// Must point to composer's autoload file.
28- require( 'vendor/autoload.php') ;
28+ require 'vendor/autoload.php';
2929
3030// Language of data (try your own language here!):
3131$lang = 'de';
3232
3333// Units (can be 'metric' or 'imperial' [default]):
3434$units = 'metric';
3535
36- // Get OpenWeatherMap object. Don't use caching (take a look into Examples/Cache.php to see how it works).
37- $owm = new OpenWeatherMap();
36+ // Create OpenWeatherMap object.
37+ // Don't use caching (take a look into Examples/Cache.php to see how it works).
38+ $owm = new OpenWeatherMap('YOUR-API-KEY');
3839
3940try {
4041 $weather = $owm->getWeather('Berlin', $units, $lang);
You can’t perform that action at this time.
0 commit comments