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
.
Current Weather In City
weather/current-city@1.0.3
2 providers
Get Current Weather In City
GetCurrentWeatherInCity
Get current weather in a city in chosen units
Input
city
units
Result
temperature
feelsLike
description
Integrate
1.
Choose a provider
Mock implementation
openweathermap
wttr-in
Request a missing provider
2.
Use
GetCurrentWeatherInCity
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 (object)
temperature
required
Temperature in specified units
number
feelsLike
optional
Subjective temperature in specified units
number
description
optional
Text description of weather, e.g. "Partly cloudy"
string
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
GetCurrentWeatherInCity
Author
@superface
Source
View source
Verified