Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

apikey

apikey: string

Accu Weather API key.

Private axiosInstance

axiosInstance: AxiosInstance

The instance that send requests to API

detail

detail: boolean

Whether return full object when searching

language

language: string

Language of retrieve data

metric

metric: boolean

Whether or not to return metric values.

Methods

getDailyForecast

  • getDailyForecast(day: 1 | 5 | 10 | 15, locationKey: string): Promise<IDailyForecastData>
  • Get daily forecast data for a specific location.

    Parameters

    • day: 1 | 5 | 10 | 15

      days of forecast to return

    • locationKey: string

      Location key

    Returns Promise<IDailyForecastData>

    Daily Forecast data

getHourlyForecast

  • getHourlyForecast(hours: 1 | 12 | 24 | 72 | 120, locationKey: string): Promise<IHourlyForecastData[]>
  • Get daily forecast data for a specific location.

    Parameters

    • hours: 1 | 12 | 24 | 72 | 120

      hours of forecast to return

    • locationKey: string

      Location key

    Returns Promise<IHourlyForecastData[]>

    Hourly Forecast data

Protected handleError

Generated using TypeDoc