Download the PHP package mazha/my-weather without Composer
On this page you can find all versions of the php package mazha/my-weather. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package my-weather
my-weather
这是个学习demo.
安装
使用
demo 1.
获取实时天气
返回示例:
返回近期天气
返回示例:
返回xml格式数据
默认返回是json格式,第三个参数设定返回数据格式
返回示例:
调用参数说明
- $city - 城市名,比如:“深圳”;
- $type - 返回内容类型:base: 返回实况天气 / all: 返回预报天气;
- $format - 输出的数据格式,默认为 json 格式,当 output 设置为 “xml” 时,输出的为 XML 格式的数据。
laravel 中使用
修改config/services.php
添加env配置
demo.
贡献
你可以通过三种途径联系到作者:
- 提交地址 issue tracker.
- 回答问题或者bug修复 issue tracker.
- 提供新功能或者wiki.
代码贡献过程不是很正式。您只需要确保遵循PSR-0、PSR-1和PSR-2编码准则。在适用的情况下,任何新的代码贡献都必须伴随着单元测试。
License
MIT
All versions of my-weather with dependencies
PHP Build Version
Package Version
The package mazha/my-weather contains the following files
Loading the files please wait ....