National Weather Service

免费
通过 API Guy | 已更新 год назад | Weather
人气

9.6 / 10

延迟

126ms

服务等级

100%

返回所有讨论

Stations by states fails

avatar
dcbriccetti
3 года назад

import requests

url = “https://national-weather-service.p.rapidapi.com/stations

querystring = {“states”: “CA”}

headers = {‘x-rapidapi-host’: “national-weather-service.p.rapidapi.com”,
‘x-rapidapi-key’: “5eb55b9223mshb077877563682ddp16f4c4jsn70c943b6aab1”}

response = requests.request(“GET”, url, headers=headers, params=querystring)

print(response.text)

{
“correlationId”: “fadebe16-e3f4-4389-a885-c98fe91c891d”,
“title”: “Invalid Parameter”,
“type”: “https://api.weather.gov/problems/InvalidParameter”,
“status”: 400,
“detail”: “Parameter “states” is invalid: Unknown query parameter”,
“instance”: “https://api.weather.gov/requests/fadebe16-e3f4-4389-a885-c98fe91c891d
}

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论
打分:5 - 投票:1