<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 天氣預報 >[danger]### 免費接口,每日100次免費調用,會員可不限次數調用,購買[API會員](https://market.topthink.com/product/210) ![](https://img.kancloud.cn/39/ad/39adaf227b128836bf06dfc400e855b7_236x239.png =x120) > 查詢天氣情況:溫度、濕度、AQI、天氣、風向、生活指數等 ## 接口調用([調用須知](https://docs.topthink.com/think-api/1835086)) ## 接口1:根據城市查詢天氣 ### 請求地址 ``` GET https://api.topthink.com/weather/query ``` ### 請求參數 | 名稱 | 必填 | 類型 | 說明 | | --- | --- | --- | --- | | appCode| 是| string|用戶授權碼,參考[API調用](https://docs.topthink.com/think-api/1835086) | | city | 是 | string | 要查詢的城市名稱/id,城市名稱如:溫州、上海、北京| ### 返回參數 | 名稱 | 類型 | 說明 | | --- | --- | --- | | city | string| 城市名 | | realtime | \- | 當前天氣詳情情況 | | info | string | 天氣情況,如:晴、多云 | | wid | string | 天氣標識id,可參考小接口2 | | temperature | string | 溫度,可能為空 | | humidity | string | 濕度,可能為空 | | direct | string | 風向,可能為空 | | power | string | 風力,可能為空 | | aqi | string | 空氣質量指數,可能為空 | | future | \- | 近5天天氣情況 | | date | string | 日期 | | temperature | string | 溫度,最低溫/最高溫 | | weather | string | 天氣情況 | | direct | string | 風向 | ## SDK調用 ``` $client = new Client("YourAppCode"); $result = $client->weatherQuery() ->withCity('上海') ->request(); dump($result); ``` 返回數據示例: ~~~ { "message": "查詢成功", "data": { "city": "上海", "realtime": { "temperature": "4", "humidity": "82", "info": "陰", "wid": "02", "direct": "西北風", "power": "3級", "aqi": "80" }, "future": [ { "date": "2019-02-22", "temperature": "1/7℃", "weather": "小雨轉多云", "wid": { "day": "07", "night": "01" }, "direct": "北風轉西北風" }, { "date": "2019-02-23", "temperature": "2/11℃", "weather": "多云轉陰", "wid": { "day": "01", "night": "02" }, "direct": "北風轉東北風" }, { "date": "2019-02-24", "temperature": "6/12℃", "weather": "多云", "wid": { "day": "01", "night": "01" }, "direct": "東北風轉北風" }, { "date": "2019-02-25", "temperature": "5/12℃", "weather": "小雨轉多云", "wid": { "day": "07", "night": "01" }, "direct": "東北風" }, { "date": "2019-02-26", "temperature": "5/11℃", "weather": "多云轉小雨", "wid": { "day": "01", "night": "07" }, "direct": "東北風" } ] }, "code": 0 } ~~~ ## 接口2:根據城市查詢生活指數 ### 請求地址 ``` GET https://api.topthink.com/weather/life ``` ### 請求參數 | 名稱 | 必填 | 類型 | 說明 | | --- | --- | --- | --- | | appCode| 是| string|用戶授權碼,參考[API調用](https://docs.topthink.com/think-api/1835086) | | city | 是 | string | 要查詢的城市名稱/id,城市名稱如:溫州、上海、北京| ### 返回參數 | 名稱 | 類型 | 說明 | | --- | --- | --- | | city | string| 城市名 | | life | \- | 生活指數 | | kongtiao | array | 空調指數 | | guomin| array | 過敏指數 | | shushidu | array | 舒適度 | | chuanyi| array | 穿衣指數 | | diaoyu| array| 釣魚指數 | | ganmao | array| 感冒指數 | | ziwaixian| array | 紫外線指數 | | xiche| array| 洗車指數 | | yundong | array| 運動指數 | | daisan| array | 帶傘指數 | ## SDK調用 ``` $client = new Client("YourAppCode"); $result = $client->weatherLife() ->withCity('北京') ->request(); dump($result); ``` 返回數據示例: ~~~ { "message": "查詢成功", "data": { "city": "北京", "life": { "kongtiao": {/*空調開啟*/ "v": "開啟制暖空調",/*指數*/ "des": "您將感到有些冷,可以適當開啟制暖空調調節室內溫度,以免著涼感冒。"/*指數詳情*/ }, "guomin": {/*過敏*/ "v": "極不易發", "des": "天氣條件極不易誘發過敏,可放心外出,享受生活。" }, "shushidu": {/*舒適度*/ "v": "較不舒適", "des": "白天天氣晴好,但仍會使您感覺偏冷,不很舒適,請注意適時添加衣物,以防感冒。" }, "chuanyi": {/*穿衣*/ "v": "冷", "des": "天氣冷,建議著棉服、羽絨服、皮夾克加羊毛衫等冬季服裝。年老體弱者宜著厚棉衣、冬大衣或厚羽絨服。" }, "diaoyu": {/*釣魚*/ "v": "不宜", "des": "天氣冷,不適合垂釣。" }, "ganmao": {/*感冒*/ "v": "較易發", "des": "晝夜溫差較大,較易發生感冒,請適當增減衣服。體質較弱的朋友請注意防護。" }, "ziwaixian": {/*紫外線*/ "v": "弱", "des": "紫外線強度較弱,建議出門前涂擦SPF在12-15之間、PA+的防曬護膚品。" }, "xiche": {/*洗車*/ "v": "較適宜", "des": "較適宜洗車,未來一天無雨,風力較小,擦洗一新的汽車至少能保持一天。" }, "yundong": {/*運動*/ "v": "較不宜", "des": "天氣較好,但考慮天氣寒冷,推薦您進行室內運動,戶外運動時請注意保暖并做好準備活動。" }, "daisan": {/*帶傘*/ "v": "不帶傘", "des": "天氣較好,您在出門的時候無須帶雨傘。" } } }, "code": 0 } ~~~ ## 接口3:天氣種類列表(可內置 無需每次讀取) ### 請求地址 ``` GET https://api.topthink.com/weather/wids ``` ### 請求參數 無 ### 返回參數 參考返回示例 ## SDK調用 ``` $client = new Client("YourAppCode"); $result = $client->weatherWids() ->request(); dump($result); ``` 返回數據示例: ~~~ { "message": "查詢成功", "data": [ { "wid": "00", "weather": "晴" }, { "wid": "01", "weather": "多云" }, { "wid": "02", "weather": "陰" }, { "wid": "03", "weather": "陣雨" }, { "wid": "04", "weather": "雷陣雨" }, { "wid": "05", "weather": "雷陣雨伴有冰雹" }, { "wid": "06", "weather": "雨夾雪" }, { "wid": "07", "weather": "小雨" }, { "wid": "08", "weather": "中雨" }, { "wid": "09", "weather": "大雨" }, { "wid": "10", "weather": "暴雨" }, { "wid": "11", "weather": "大暴雨" }, { "wid": "12", "weather": "特大暴雨" }, { "wid": "13", "weather": "陣雪" }, { "wid": "14", "weather": "小雪" }, { "wid": "15", "weather": "中雪" }, { "wid": "16", "weather": "大雪" }, { "wid": "17", "weather": "暴雪" }, { "wid": "18", "weather": "霧" }, { "wid": "19", "weather": "凍雨" }, { "wid": "20", "weather": "沙塵暴" }, { "wid": "21", "weather": "小到中雨" }, { "wid": "22", "weather": "中到大雨" }, { "wid": "23", "weather": "大到暴雨" }, { "wid": "24", "weather": "暴雨到大暴雨" }, { "wid": "25", "weather": "大暴雨到特大暴雨" }, { "wid": "26", "weather": "小到中雪" }, { "wid": "27", "weather": "中到大雪" }, { "wid": "28", "weather": "大到暴雪" }, { "wid": "29", "weather": "浮塵" }, { "wid": "30", "weather": "揚沙" }, { "wid": "31", "weather": "強沙塵暴" }, { "wid": "53", "weather": "霾" } ], "code": 0 } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看