承接 waqidevs/waqi-php-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

waqidevs/waqi-php-client

最新稳定版本:2.0.0

Composer 安装命令:

composer require waqidevs/waqi-php-client

包简介

PHP wrapper for the AQICN (air quality) APIs

README 文档

README

PHP client library for the World Air Quality Index (WAQI) APIs. See documentation here. All available API modules are supported - City feed, Geolocalized feed, Search, and Map Queries.

Installation

You can install this package with composer using the command below

 composer require waqidevs/waqi-php-client

Get API key

Sign up for an API key here

Making Requests

The primary WAQI\API class is a factory class that creates objects for each of the API modules, allowing you to make requests to any of them with your desired request parameters. You have to first create an object for it, then access your desired API module via the object. See the code snippets below:

$api = new WAQI\API(WAQI_TOKEN);

For City Feed:

$response = $api->cityFeed()
    ->setCity("Munich")
    ->fetch();

For Search:

$response = $api->search()
    ->setKeyword("Johannesburg")
    ->fetch();

For Lat/Lng based Geolocalized feed:

$response = $api->geoFeed()
    ->setCoordinates(37.7749, -122.4194)
    ->fetch();

For IP based Geolocalized feed:

$response = $api->ipFeed()
    ->setIP("MY_IP")
    ->fetch();

For Map Queries:

$response = $api->mapStation()
    ->setMapBounds(40.712, -74.006, 34.052, -118.243)
    ->fetch();

统计信息

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

GitHub 信息

  • Stars: 15
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固