Curl
Python Requests
Zingu Apis
Javascript Fetch
curl 'https://api.weather.gov/stations/KLAX/observations?start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z' \
-H 'User-Agent: robustapi-lore/1.0'
import requests
resp = requests.get(
"https://api.weather.gov/stations/KLAX/observations",
params={
'start': '2024-01-01T00:00:00Z',
'end': '2024-01-02T00:00:00Z',
},
headers={
'User-Agent': 'robustapi-lore/1.0',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("weather")
result = api.fetch("stations/{stationId}/observations", start="2024-01-01T00:00:00Z", end="2024-01-02T00:00:00Z")
for item in result:
print(item)
const resp = await fetch("https://api.weather.gov/stations/KLAX/observations?start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z", {
headers: {
"User-Agent": "robustapi-lore/1.0",
},
});
const data = await resp.json();