【问题标题】:How to use world weather online api如何使用世界天气在线api
【发布时间】:2013-12-30 18:59:22
【问题描述】:

你好,我想知道如何使用 worldweatheronline.com 的天气 api,它的请求看起来像这样......

http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&format=json&num_of_days=5&show_comments=no&key=xxxxxxxxxxxxxxxxxxxxxxx

我只是新手,真的不知道如何使用它,感谢任何帮助。

它使用 JSON 请求,可以在这里找到 http://developer.worldweatheronline.com/io-docs

密钥 xxxxxxxxxxxxxxxxxxxx 被用来隐藏我的密钥

【问题讨论】:

  • 你想用什么语言调用 API?
  • @HAS 任何我可以最好的我想使用 json 和英语用户语言

标签: json weather weather-api


【解决方案1】:

此包被设计为 WorldWeatherOnline API 的包装器:

https://pypi.org/project/WorldWeatherPy/

【讨论】:

    【解决方案2】:

    他们最近在他们的博客上发布了一些指南,展示了如何在 PHP 和 NodeJs 中使用他们的 API

    PHPGetting Started with World Weather Online API using PHP

    Node.js Getting Started with World Weather Online API & Node.js

    【讨论】:

      【解决方案3】:

      这里是一个例子 http://api.worldweatheronline.com/free/v2/weather.ashx?key=[API_KEY]&q=48.85,2.35&num_of_days=2&tp=3&format=json

      这里是必填和非必填字段的指南:http://www.worldweatheronline.com/api/docs/local-city-town-weather-api.aspx#current_condition_element

      【讨论】:

        猜你喜欢
        • 2017-04-03
        • 1970-01-01
        • 1970-01-01
        • 2020-05-30
        • 1970-01-01
        • 1970-01-01
        • 2018-03-12
        • 1970-01-01
        • 2014-08-05
        相关资源
        最近更新 更多