ainpy/weather

A weather SDK.

0.0.1 2020-01-02 08:41 UTC

This package is auto-updated.

Last update: 2024-05-29 04:22:35 UTC


README

基于 高德开放平台 的 PHP 天气信息组件。
Build Status
StyleCI build status

安装

$ composer require ainpy/weather -vvv

配置

在使用本扩展之前,你需要去 高德开放平台 注册账号,然后创建应用,获取应用的 API KEY。

使用

use Ainpy\Weather\Weather;

$key = 'xxx';

$weather = new Weather($key);

获取实时天气

$response = $weather->getWeather('北京');