mbajda/yahoo-weather 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mbajda/yahoo-weather

Composer 安装命令:

composer require mbajda/yahoo-weather

包简介

Yahoo Weather API PHP Implementation

README 文档

README

This library is a PHP implementation of Yahoo Weather API. It allows querying for many weather conditions for specified location on the world.

Usage

First, you need to create instance of weather API endpoint. To do this, simply use following code:

$cache = new \YahooWeather\Endpoint\Cache\FileCache('var\cache', 60*60*12);
$endpoint = new \YahooWeather\Endpoint($cache);

YahooWeather\Endpoint is the main class of the library.

YahooWeather\Endpoint\Cache\FileCache is the cache class to use with the endpoint. The constructor accepts up to 2 parameters. The first is the directory, in which the cache will be stored. The second is cache time-to-live - the time, for which the cache file will be used.

$endpoint->getWOEIDs('Warsaw');

This line will allow you to get WOEID (location's ID) for a specified location.

$endpoint->getData(523920);

getData method allows you to get all the data for specified WOEID (which is the parameter for that and other methods).

Additional information

The library utilizes connection with https://query.yahooapis.com - Yahoo APIs. There is a limit of queries made by day, which is equal to 2000.

Read more at https://developer.yahoo.com/weather

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固