OpenWeatherMapAPI

授权协议 MIT
开发语言 Objective-C
所属分类 iOS代码库、 网络(Networking)
软件类型 开源软件
地区 不详
投 递 者 孔彭祖
操作系统 iOS
开源组织
适用人群 未知
 软件概览

OpenWeatherMapAPI openweathermap.org 网站的 iOS 客户端 API 包

  • 提供天气信息的Android应用在Play商店中很常见。 此外,Weather应用程序和小部件是下载次数最多的项目之一。 当需要开发天气应用程序时 ,有必要使用天气提供程序作为天气信息的来源。 这些天气提供程序公开了一组服务,换句话说,就是一组支持RestFul Webservices的API。 这些服务大多数都接受XML或JSON数据。 在根据我们的需求选择合适的提供商之前,了解服务功能非常重要

  • import requests, json # Enter your API key here api_key = "Your_API_Key" # base_url variable to store url base_url = "http://api.openweathermap.org/data/2.5/weather?" # Give city name city_name =

  • 使用openweathermap api 报错401 错误信息如下: {"cod":401,"message":"Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."} 根据提示查阅http://openweathermap.org/faq#error401 官网信息显示说在2015.9