Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gastonpereyra/weather-arg
A Package to consult the weather in Argentina
https://github.com/gastonpereyra/weather-arg
nodejs npm package weather
Last synced: 8 days ago
JSON representation
A Package to consult the weather in Argentina
- Host: GitHub
- URL: https://github.com/gastonpereyra/weather-arg
- Owner: gastonpereyra
- License: mit
- Created: 2020-07-25T00:40:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T07:45:01.000Z (over 1 year ago)
- Last Synced: 2024-10-13T15:11:34.261Z (about 1 month ago)
- Topics: nodejs, npm, package, weather
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/weather-arg
- Size: 146 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# :cloud: Weather-arg
## :ok_hand: Code Quality Status
![Tests](https://github.com/gastonpereyra/weather-arg/workflows/Tests/badge.svg)
[![Coverage Status](https://img.shields.io/coveralls/github/gastonpereyra/weather-arg/master.svg)](https://coveralls.io/r/gastonpereyra/weather-arg?branch=master)## :eyes: Description
A Package to consult the weather in Argentina## Installation
```
npm i weather-arg
```## Usage
```js
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'
}
*/
```