PHPackages                             bordon/weather - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bordon/weather

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bordon/weather
==============

a weather sdk

0.0.1(6y ago)28MITPHPPHP &gt;=7.1.0CI failing

Since Oct 31Pushed 6y agoCompare

[ Source](https://github.com/subordon/weather)[ Packagist](https://packagist.org/packages/bordon/weather)[ RSS](/packages/bordon-weather/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

 weather
=========

[](#-weather-)

🌈 a weather sdk.

[![Build Status](https://camo.githubusercontent.com/bd863cd3c2fdbaa3e70a914a3d42319abefd6a1f7e70cc9b9f805deff8f00471/68747470733a2f2f7472617669732d63692e6f72672f7375626f72646f6e2f776561746865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/subordon/weather)

安装
--

[](#安装)

```
$ composer require bordon/weather -vvv
```

使用
--

[](#使用)

```
use Bordon\Weather\Weather;

$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';

$weather = new Weather($key);
```

获取实时天气
------

[](#获取实时天气)

```
$response = $weather->getLiveWeather('深圳');
```

获取预报天气
------

[](#获取预报天气)

```
$response = $weather->getForecastWeather('深圳');
```

设置返回格式
------

[](#设置返回格式)

返回值类型，可选 json 与 xml，默认 json；

```
$response = $weather->getLiveWeather('深圳', 'xml');
```

参考
--

[](#参考)

- [高德开放平台天气接口](https://lbs.amap.com/api/webservice/guide/api/weatherinfo/)

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/bordon/weather/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/bordon/weather/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2388d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81871145f3cfdf5456bafd06ae53d3f5b7979f3fd19071a321b0c38d87def0f0?d=identicon)[subordon](/maintainers/subordon)

---

Top Contributors

[![subordon](https://avatars.githubusercontent.com/u/18551593?v=4)](https://github.com/subordon "subordon (6 commits)")

### Embed Badge

![Health badge](/badges/bordon-weather/health.svg)

```
[![Health](https://phpackages.com/badges/bordon-weather/health.svg)](https://phpackages.com/packages/bordon-weather)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
