Current Weather In City

Version: 1.0.2
weather/current-city
superface

Get current weather for the city

Get Current Weather In City

Get current weather in the city in chosen units.

city
units
temperature
feelsLike
description

1. Install

npx @superfaceai/cli install weather/current-city

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('weather/current-city');

  // Use the profile
  const result = await profile
    .getUseCase('GetCurrentWeatherInCity')
    .perform({
      city: 'Prague, Czech Republic',
      units: 'C'
    });

  return result.unwrap();
}

run();

3. Add providers