curl 'https://api.weather.gov/offices/OKX/headlines' \
-H 'User-Agent: RobustAPI-Example'
import requests
resp = requests.get(
"https://api.weather.gov/offices/OKX/headlines",
headers={
'User-Agent': 'RobustAPI-Example',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("weather")
result = api.fetch("offices/{officeId}/headlines")
for item in result:
print(item)
const resp = await fetch("https://api.weather.gov/offices/OKX/headlines", {
headers: {
"User-Agent": "RobustAPI-Example",
},
});
const data = await resp.json();