Skip to content

Commit

Permalink
Updated readme and added a bunch of colourful badges
Browse files Browse the repository at this point in the history
  • Loading branch information
lostfocus committed Jul 24, 2022
1 parent d8e2979 commit 4117675
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
# brightsky
Brightsky Provider
# PHP Weather Provider for Bright Sky

![Packagist Version](https://img.shields.io/packagist/v/php-weather/brightsky)
![GitHub Release Date](https://img.shields.io/github/release-date/php-weather/brightsky)
![GitHub commits since tagged version](https://img.shields.io/github/commits-since/php-weather/brightsky/0.1.0)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/php-weather/brightsky/PHP%20Composer)
![GitHub](https://img.shields.io/github/license/php-weather/brightsky)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/php-weather/brightsky)

This is the [Bright Sky](https://brightsky.dev/) provider from PHP Weather.

> Bright Sky is an open-source project aiming to make some of the more popular data — in particular weather observations from the DWD station network and weather forecasts from the MOSMIX model — available in a free, simple JSON API.
## Installation

Via Composer

```shell
composer require php-weather/brightsky
```

## Usage

```php
$httpClient = new \Http\Adapter\Guzzle7\Client();
$brightSky = new \PhpWeather\Provider\Brightsky\Brightsky($httpClient);

$latitude = 47.873;
$longitude = 8.004;

$currentWeatherQuery = \PhpWeather\Common\WeatherQuery::create($latitude, $longitude);
$currentWeather = $brightSky->getCurrentWeather($currentWeatherQuery);
```
4 changes: 2 additions & 2 deletions Tests/BrightSkyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function setUp(): void
*/
public function testCurrentWeather(): void
{
$latitude = 47.8739259;
$longitude = 8.0043961;
$latitude = 47.873;
$longitude = 8.004;
$testQuery = WeatherQuery::create($latitude, $longitude);
$testString = 'https://api.brightsky.dev/current_weather?lat=47.8739259&lon=8.0043961&units=dwd';

Expand Down

0 comments on commit 4117675

Please sign in to comment.