Show / Hide Table of Contents

Class OpenWeatherMapService

Inheritance
System.Object
OpenWeatherMapService
Namespace: CommonBotLibrary.Services
Assembly: cs.temp.dll.dll
Syntax
public class OpenWeatherMapService : IWeatherService

Constructors

OpenWeatherMapService(String)

Constructs an implementation that searches Google.

Declaration
public OpenWeatherMapService(string apiKey = null)
Parameters
Type Name Description
System.String apiKey

Defaults to API key in Tokens if null.

Methods

GetCurrentWeatherAsync(String, Unit)

Gets current weather data for a city from openweathermap.com

Declaration
public Task<OpenWeatherMapResult> GetCurrentWeatherAsync(string city, Unit units = null)
Parameters
Type Name Description
System.String city

The city to lookup weather for.

Unit units

The units for temperature, etc.

Returns
Type Description
Task<OpenWeatherMapResult>

Current weather conditions.

See Also
API Info
Back to top © 2017 - Borja Canseco