Menu
Docs
Feedback
Login
You are viewing a section of Superface that will be
deprecated in Q4 2023
. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit
superface.ai/docs/migrate
.
Weather Forecast For City
weather/forecast-city@1.0.1
1 provider
Get Weather Forecast For City
GetWeatherForecastInCity
Get weather forecast for a city in chosen units
Input
City
Units
Result
AverageTemperature
Date
MaxTemperature
MinTemperature
Integrate
1.
Choose a provider
Mock implementation
wttr-in
Request a missing provider
2.
Use
GetWeatherForecastInCity
with
mock
in your code
Below instructions are for our Node.js SDK.
Use OneService for other languages.
npm
i
@superfaceai/one-sdk
Copy
Copied!
Copy
Copied!
Structure details
Input (object)
city
required
Name of the city including state and country, e.g.: "Prague, Czech Republic" or "New York City, NY, USA"
string
units
optional
Units used to represent temperature - Fahrenheit, Celsius, Kelvin; Celsius by default
enum
C
F
K
Example
Copy
Copied!
Result (list of objects)
averageTemperature
required
Daily average Temperature in specified units
number
date
required
Date of the weather forecast
string
maxTemperature
optional
Daily maximal temperature in specified units
number
minTemperature
optional
Datily minimal temperature in specified units
number
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
GetWeatherForecastInCity
Author
@superface
Source
View source
Verified