Skip to content

Commit e57313a

Browse files
committed
docs
1 parent e780f08 commit e57313a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ require('path/to/vendor/autoload.php');
2525
$weatherbit = new \Attogram\Weatherbit\Weatherbit();
2626

2727
try {
28+
// Always set your API Key
2829
$weatherbit->setKey('YOUR-WEATHERBIT-API-KEY');
30+
31+
// Set location using one of the setLocationBy*() functions
2932
$weatherbit->setLocationByCity('Amsterdam', 'NL');
30-
$currentWeather = $weatherbit->getCurrent(); // Gets array of current weather data
33+
34+
// Gets array of current weather data
35+
$currentWeather = $weatherbit->getCurrent();
36+
3137
} catch (Exception $exception) {
3238
exit('Error: ' . $exception->getMessage());
3339
}

0 commit comments

Comments
 (0)