You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Get 24-hour forecast (JSON)
curl "http://localhost:8000/weather/hourly?lat=40.7128&lon=-74.006&hours=24"# Get 48-hour forecast with imperial units
curl "http://localhost:8000/weather/hourly?lat=40.7128&lon=-74.006&hours=48&units=imperial"# Download as CSV
curl "http://localhost:8000/weather/hourly?lat=40.7128&lon=-74.006&format=csv" -o hourly.csv
Returns hourly data points
Units conversion works (metric/imperial)
CSV download works
Cache hit on second request
1.2 Daily Forecast
# Get 7-day forecast
curl "http://localhost:8000/weather/daily?lat=40.7128&lon=-74.006&days=7"# Get 14-day forecast
curl "http://localhost:8000/weather/daily?lat=40.7128&lon=-74.006&days=14"
Returns daily data with sunrise/sunset
14-day forecast works
Weather codes included
1.3 Historical Data
# Get historical data
curl "http://localhost:8000/weather/historical?lat=40.7128&lon=-74.006&start=2024-01-01&end=2024-01-07"# Invalid date range (>1 year)
curl "http://localhost:8000/weather/historical?lat=40.7128&lon=-74.006&start=2022-01-01&end=2024-01-01"
Historical data returns
Date validation works (rejects >365 days)
Error for invalid date range
2. Geocoding
2.1 Location Search
# Search for a city
curl "http://localhost:8000/geocode/search?q=London&limit=5"# Search with language
curl "http://localhost:8000/geocode/search?q=Tokyo&lang=en"
# Use key in header
curl "http://localhost:8000/weather/hourly?lat=40.7128&lon=-74.006" \
-H "X-API-Key: iw_live_YOUR_KEY"# Use key in query param
curl "http://localhost:8000/weather/hourly?lat=40.7128&lon=-74.006&apikey=iw_live_YOUR_KEY"
curl -X POST "http://localhost:8000/predict/model/train?lat=40.7128&lon=-74.006"
Model training completes
Model saved to data/models/
7. Internationalization
7.1 Supported Languages
curl "http://localhost:8000/i18n/languages"
Returns list: en, hi, ur, ar, es
7.2 Get Translations
# English
curl "http://localhost:8000/i18n/translations?lang=en"# Hindi
curl "http://localhost:8000/i18n/translations?lang=hi"# Arabic
curl "http://localhost:8000/i18n/translations?lang=ar"