• 天气接口-高德api


    简要描述:

    • 高德天气接口api

    接口版本:

    版本号 制定人 制定日期 修订日期

    请求URL:

    请求方式:

    • GET

    请求头:

    参数名 是否必须 类型 说明

    请求参数:

    参数名 是否必须 类型 说明
    key string 秘钥
    city string 城市编码
    extensions string 可选值:base/all;base:返回实况天气;all:返回预报天气
    output string 返回格式;可选值:JSON,XML

    返回示例:

    正确时返回:

    {
      "status": "1",
      "count": "1",
      "info": "OK",
      "infocode": "10000",
      "forecasts": [
        {
          "city": "杭州市",
          "adcode": "330100",
          "province": "浙江",
          "reporttime": "2019-12-23 14:25:41",
          "casts": [
            {
              "date": "2019-12-23",
              "week": "1",
              "dayweather": "小雨",
              "nightweather": "小雨-中雨",
              "daytemp": "11",
              "nighttemp": "8",
              "daywind": "东",
              "nightwind": "东",
              "daypower": "4",
              "nightpower": "4"
            },
            {
              "date": "2019-12-24",
              "week": "2",
              "dayweather": "小雨",
              "nightweather": "小雨",
              "daytemp": "12",
              "nighttemp": "9",
              "daywind": "东",
              "nightwind": "东",
              "daypower": "4",
              "nightpower": "4"
            },
            {
              "date": "2019-12-25",
              "week": "3",
              "dayweather": "小雨",
              "nightweather": "小雨",
              "daytemp": "13",
              "nighttemp": "10",
              "daywind": "无风向",
              "nightwind": "无风向",
              "daypower": "≤3",
              "nightpower": "≤3"
            },
            {
              "date": "2019-12-26",
              "week": "4",
              "dayweather": "阴",
              "nightweather": "多云",
              "daytemp": "12",
              "nighttemp": "2",
              "daywind": "西",
              "nightwind": "西",
              "daypower": "6",
              "nightpower": "6"
            }
          ]
        }
      ]
    }
    

    错误时返回:

    {
        、、、
    }
    

    返回参数说明:

    参数名 类型 说明

    备注:

    • 更多返回错误代码请看首页的错误代码描述
  • 相关阅读:
    有效的工作,小记
    快排,做个笔记
    git在vs2017中的使用
    正则匹配指定字符之间的内容,并替换(多个匹配替换)
    记一个JS树结构路径查找
    追赶法求三对角矩阵
    vs 2010 Cannot find or open the PDB file
    mysql学习笔记6——用phpmyadmin和在腾讯微云中创建数据库
    mysql学习笔记5
    mysql学习笔记4
  • 原文地址:https://www.cnblogs.com/mikemhm/p/12083871.html
Copyright © 2020-2023  润新知