npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

surfsup

v0.6.0

Published

Node wrapper for Marine/Sailing/Surfing Weather API

Downloads

19

Readme

surfsup

Node module for Marine/Sailing/Surfing Weather API

the beach

Installation:

npm install surfsup

Usage:

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 |

Compile TypeScript

gulp compile

Tests

gulp tests

Issues

Issues

License

MIT License