weather-arg

1.0.2 • Public • Published

☁️ Weather-arg

👌 Code Quality Status

Tests Coverage Status

👀 Description

A Package to consult the weather in Argentina

Installation

npm i weather-arg

Usage

const WeatherArg = require('weather-arg');

// Get all substation Weather

const substationWeathers = await WeatherArg.getWeathers();

/*
output: [
    {
        id: 9949,
        name: 'Cutral Co',
        province: 'Neuquén',
        lastUpdate: 2020-07-26T22:00:00.000Z,
        humidity: 62,
        pressure: 982.1,
        st: 5.2,
        visibility: 15,
        windSpeed: 14,
        weatherId: 0,
        description: 'Despejado',
        temperature: 7.8,
        windDirection: 'Oeste',
        temperatureDescription: '7.8ºC'
    },
    ...180 more
]
*/

// Get substation Weather by Province

const substationWeathers = await WeatherArg.getWeathersByProvince('Neuquén');

/*
output: [
    {
        id: 9949,
        name: 'Cutral Co',
        province: 'Neuquén',
        lastUpdate: 2020-07-26T22:00:00.000Z,
        humidity: 62,
        pressure: 982.1,
        st: 5.2,
        visibility: 15,
        windSpeed: 14,
        weatherId: 0,
        description: 'Despejado',
        temperature: 7.8,
        windDirection: 'Oeste',
        temperatureDescription: '7.8ºC'
    },
    ...10 more
]
*/

// Get substation Weather by Name

const substationWeathers = await WeatherArg.getWeathersByName('Cutral Co');

/*
output: [
    {
        id: 9949,
        name: 'Cutral Co',
        province: 'Neuquén',
        lastUpdate: 2020-07-26T22:00:00.000Z,
        humidity: 62,
        pressure: 982.1,
        st: 5.2,
        visibility: 15,
        windSpeed: 14,
        weatherId: 0,
        description: 'Despejado',
        temperature: 7.8,
        windDirection: 'Oeste',
        temperatureDescription: '7.8ºC'
    }
]
*/

// Get substation Weather by ID

const substationWeather = await WeatherArg.getWeatherById(9949);

/*
output: {
    id: 9949,
    name: 'Cutral Co',
    province: 'Neuquén',
    lastUpdate: 2020-07-26T22:00:00.000Z,
    humidity: 62,
    pressure: 982.1,
    st: 5.2,
    visibility: 15,
    windSpeed: 14,
    weatherId: 0,
    description: 'Despejado',
    temperature: 7.8,
    windDirection: 'Oeste',
    temperatureDescription: '7.8ºC'
}
*/

// Get substation Weather by Coordinates

const substationWeather = await WeatherArg.getWeatherByCoordinates('-38.93712236','-69.22969054');

/*
output: {
    id: 9949,
    name: 'Cutral Co',
    province: 'Neuquén',
    lastUpdate: 2020-07-26T22:00:00.000Z,
    humidity: 62,
    pressure: 982.1,
    st: 5.2,
    visibility: 15,
    windSpeed: 14,
    weatherId: 0,
    description: 'Despejado',
    temperature: 7.8,
    windDirection: 'Oeste',
    temperatureDescription: '7.8ºC'
}
*/

Readme

Keywords

Package Sidebar

Install

npm i weather-arg

Weekly Downloads

32

Version

1.0.2

License

MIT

Unpacked Size

11.5 kB

Total Files

10

Last publish

Collaborators

  • gaston.pereyra