Skip to content

Commit 1e046a7

Browse files
authored
Update ReADME.md to support version controlling
1 parent 6ea1646 commit 1e046a7

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ Add the following to your `providers` array in `config/app.php`:
4747

4848

4949
```
50-
50+
Add API key and desired language in `.env`
51+
```
52+
OPENWAETHER_API_KEY=
53+
OPENWAETHER_API_LANG=en
54+
```
5155

5256
Publish the required package configuration file using the artisan command:
5357
```
@@ -56,15 +60,22 @@ Publish the required package configuration file using the artisan command:
5660
Edit the `config/openweather.php` file and modify the `api_key` value with your Open Weather Map api key.
5761
```php
5862
return [
59-
'api_key' => '',
60-
'lang' => 'en',
63+
'api_key' => env('OPENWAETHER_API_KEY', ''),
64+
'onecall_api_version' => '2.5',
65+
'historical_api_version' => '2.5',
66+
'forecast_api_version' => '2.5',
67+
'polution_api_version' => '2.5',
68+
'geo_api_version' => '1.0',
69+
'lang' => env('OPENWAETHER_API_LANG', 'en'),
6170
'date_format' => 'm/d/Y',
6271
'time_format' => 'h:i A',
6372
'day_format' => 'l',
6473
'temp_format' => 'c' // c for celcius, f for farenheit, k for kelvin
6574
];
6675
```
6776

77+
Now you can configure API version from config as [One Call API](https://openweathermap.org/price) is upgraded to version 3.0. Please set available api version in config.
78+
6879

6980
## Usage
7081
Here you can see some example of just how simple this package is to use.

0 commit comments

Comments
 (0)