Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
surfsup
Advanced tools
Readme
Node module for Marine/Sailing/Surfing Weather API
npm install surfsup
First, you'll have to grab an API key for yourself. No need to worry, they're free. :)
https://developer.worldweatheronline.com/auth/register
Then set it as an environment variable on your machine
OSX:
export WEATHER_KEY=<your key here>
Windows:
SET WEATHER_KEY=<your key here>
Get Local Weather
var SurfsUp = require('surfsup');
var su = new SurfsUp();
su.getLocalWeather({ q: 'Teahupoo, Tahiti', format: 'json' }).then(function(response) {
console.log(response);
});
Available Input Parameters:
Parameter | Type | Description |
---|---|---|
q | string | Pass Latitude/Longitude (decimal degree) of sea or ocean point |
format | string | Output format as JSON or XML |
fx | string | (Optional) Allows you to enable or disable normal weather output. The possible values are yes or no. By default it is yes. E.g:- fx=yes or fx=no |
includeLocation | string | (Optional) Returns the nearest marine weather point for which the weather data is returned for a given lat/lon value. The possible values are yes or no. By default it is no. E.g:- includeLocation=yes or includeLocation=no |
callback | string | (Optional) Only to be used for json callback feature. E.g:- callback=function_name |
lang | string | (Optional) Returns weather description text in the language of your choice. E.g:- lang=ar (Arabic). Visit Multilingual support page for more information: http://www.worldweatheronline.com/weather-api-multilingual.aspx |
Get Marine Weather
var SurfsUp = require('surfsup');
var su = new SurfsUp();
su.getMarineWeather({ q: '45,-2', format: 'json' }).then(function(response) {
console.log(response);
});
Available Input Parameters:
Parameter | Type | Description |
---|---|---|
q | string | Pass Latitude/Longitude (decimal degree) of sea or ocean point |
format | string | Output format as JSON or XML |
fx | string | (Optional) Allows you to enable or disable normal weather output. The possible values are yes or no. By default it is yes. E.g:- fx=yes or fx=no |
includeLocation | string | (Optional) Returns the nearest marine weather point for which the weather data is returned for a given lat/lon value. The possible values are yes or no. By default it is no. E.g:- includeLocation=yes or includeLocation=no |
callback | string | (Optional) Only to be used for json callback feature. E.g:- callback=function_name |
lang | string | (Optional) Returns weather description text in the language of your choice. E.g:- lang=ar (Arabic). Visit Multilingual support page for more information: http://www.worldweatheronline.com/weather-api-multilingual.aspx |
Get Ski and Mountain Weather
var SurfsUp = require('surfsup');
var su = new SurfsUp();
su.getSkiMountainWeather({ q: 'Salt Lake City', format: 'json' }).then(function(response) {
console.log(response);
});
Available Input Parameters:
Parameter | Type | Description |
---|---|---|
q | string | Pass US Zipcode, UK Postcode, Canada Postalcode, IP address, Latitude/Longitude (decimal degree) or city name |
format | string | Output format as JSON or XML |
extra | string | (Optional) It allows to request some additional information in the feed return. Possible values are isDayTime, utcDateTime. Two or more values can be passed as comma separated. |
includeLocation | string | (Optional) Returns the nearest ski and mountain weather point for which the weather data is returned for a given postcode, zipcode, city name and lat/lon values. The possible values are yes or no. By default it is no. E.g:- includeLocation=yes or includeLocation=no |
callback | string | (Optional) Only to be used for json callback feature. E.g:- callback=function_name |
lang | string | (Optional) Returns weather description text in the language of your choice. E.g:- lang=ar (Arabic). Visit Multilingual support page for more information: http://www.worldweatheronline.com/weather-api-multilingual.aspx |
Get Time Zone Data
var SurfsUp = require('surfsup');
var su = new SurfsUp();
su.getTimeZoneData({ q: 'Lima, Peru', format: 'json' }).then(function(response) {
console.log(response);
});
Available Input Parameters:
Parameter | Type | Description |
---|---|---|
q | string | Pass US Zipcode, UK Postcode, Canada Postalcode, IP address, Latitude/Longitude (decimal degree) or city name |
format | string | Output format as JSON or XML |
callback | string | (Optional) Only to be used for json callback feature. E.g:- callback=function_name |
gulp compile
gulp tests
FAQs
Node wrapper for Marine/Sailing/Surfing Weather API
The npm package surfsup receives a total of 2 weekly downloads. As such, surfsup popularity was classified as not popular.
We found that surfsup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.