{"id":19832941,"url":"https://github.com/tinywan/webman-weather","last_synced_at":"2025-05-01T16:33:47.838Z","repository":{"id":57070208,"uuid":"480779297","full_name":"Tinywan/webman-weather","owner":"Tinywan","description":"the GaoDe weather for webman plugin","archived":false,"fork":false,"pushed_at":"2022-04-12T12:37:39.000Z","size":65,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-31T20:13:03.590Z","etag":null,"topics":["php","plugin","plugins","tinywan","weather","webman","webman-framework","workerman"],"latest_commit_sha":null,"homepage":"https://www.workerman.net/plugin/44","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tinywan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-12T11:24:21.000Z","updated_at":"2024-05-10T16:14:29.000Z","dependencies_parsed_at":"2022-08-24T10:40:52.772Z","dependency_job_id":null,"html_url":"https://github.com/Tinywan/webman-weather","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-weather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-weather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-weather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-weather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinywan","download_url":"https://codeload.github.com/Tinywan/webman-weather/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224269111,"owners_count":17283630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","plugin","plugins","tinywan","weather","webman","webman-framework","workerman"],"created_at":"2024-11-12T11:39:04.301Z","updated_at":"2024-11-12T11:39:05.080Z","avatar_url":"https://github.com/Tinywan.png","language":"PHP","readme":"# webman weather plugin\n\n[![Latest Stable Version](http://poser.pugx.org/tinywan/weather/v)](https://packagist.org/packages/tinywan/weather) \n[![Total Downloads](http://poser.pugx.org/tinywan/weather/downloads)](https://packagist.org/packages/tinywan/weather) \n[![Latest Unstable Version](http://poser.pugx.org/tinywan/weather/v/unstable)](https://packagist.org/packages/tinywan/weather) \n[![License](http://poser.pugx.org/tinywan/weather/license)](https://packagist.org/packages/tinywan/weather) \n[![PHP Version Require](http://poser.pugx.org/tinywan/weather/require/php)](https://packagist.org/packages/tinywan/weather)\n\n:rainbow: 基于[高德开放平台](https://lbs.amap.com/dev/id/newuser)的天气信息插件\n\n## 安装\n\n```sh\ncomposer require tinywan/weather\n```\n\n## 使用\n\n### 配置\n\n在使用本扩展之前，你需要去 [高德开放平台](https://lbs.amap.com/dev/id/newuser) 注册账号，然后创建应用，获取应用的 API Key。\n\n### 获取实时天气\n\n```php\n$response = tinywan\\Weather::liveWeather('杭州');\n```\n响应信息\n```json\n{\n    \"status\": \"1\",\n    \"count\": \"1\",\n    \"info\": \"OK\",\n    \"infocode\": \"10000\",\n    \"lives\": [\n        {\n            \"province\": \"浙江\",\n            \"city\": \"杭州市\",\n            \"adcode\": \"330100\",\n            \"weather\": \"阴\",\n            \"temperature\": \"27\",\n            \"winddirection\": \"东\",\n            \"windpower\": \"≤3\",\n            \"humidity\": \"47\",\n            \"reporttime\": \"2022-04-12 20:02:04\"\n        }\n    ]\n}\n```\n\n响应参数\n\n![live.png](./live.png)\n\n### 获取近期天气预报\n\n```php\n$response = tinywan\\Weather::forecastsWeather('杭州');\n```\n\n响应信息\n\n```json\n{\n    \"status\": \"1\",\n    \"count\": \"1\",\n    \"info\": \"OK\",\n    \"infocode\": \"10000\",\n    \"forecasts\": [\n        {\n            \"city\": \"杭州市\",\n            \"adcode\": \"330100\",\n            \"province\": \"浙江\",\n            \"reporttime\": \"2022-04-12 20:02:04\",\n            \"casts\": [\n                {\n                    \"date\": \"2022-04-12\",\n                    \"week\": \"2\",\n                    \"dayweather\": \"多云\",\n                    \"nightweather\": \"阴\",\n                    \"daytemp\": \"33\",\n                    \"nighttemp\": \"19\",\n                    \"daywind\": \"东\",\n                    \"nightwind\": \"东\",\n                    \"daypower\": \"4\",\n                    \"nightpower\": \"4\"\n                },\n                {\n                    \"date\": \"2022-04-13\",\n                    \"week\": \"3\",\n                    \"dayweather\": \"中雨\",\n                    \"nightweather\": \"小雨\",\n                    \"daytemp\": \"22\",\n                    \"nighttemp\": \"16\",\n                    \"daywind\": \"西北\",\n                    \"nightwind\": \"西北\",\n                    \"daypower\": \"4\",\n                    \"nightpower\": \"4\"\n                },\n                {\n                    \"date\": \"2022-04-14\",\n                    \"week\": \"4\",\n                    \"dayweather\": \"小雨\",\n                    \"nightweather\": \"小雨\",\n                    \"daytemp\": \"18\",\n                    \"nighttemp\": \"16\",\n                    \"daywind\": \"北\",\n                    \"nightwind\": \"北\",\n                    \"daypower\": \"4\",\n                    \"nightpower\": \"4\"\n                },\n                {\n                    \"date\": \"2022-04-15\",\n                    \"week\": \"5\",\n                    \"dayweather\": \"小雨\",\n                    \"nightweather\": \"小雨\",\n                    \"daytemp\": \"15\",\n                    \"nighttemp\": \"11\",\n                    \"daywind\": \"东北\",\n                    \"nightwind\": \"东北\",\n                    \"daypower\": \"4\",\n                    \"nightpower\": \"4\"\n                }\n            ]\n        }\n    ]\n}\n```\n\n响应参数\n\n![forecast.png](./forecast.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywan%2Fwebman-weather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinywan%2Fwebman-weather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywan%2Fwebman-weather/lists"}