Code Monkey home page Code Monkey logo

wundernode's Introduction

wundernode

NodeJS API to integrate with Wunderground API.

This library provides NodeJS with an abstraction to the Wunderground API allowing developers to query and integrate Wunderground services into their own applications.

This library nor the authors have any formal relationship with Wunderground other than the wind we use.

Getting Started

  1. If you have never done so, sign up for [Wunderground] Dev API service(http://www.wunderground.com/weather/api/)
  2. Wait for you API key to be generated. This should be quick
  3. Download wundernode: npm install wundernode
  4. Look at the Example. Replace the null apikey value with your api key.
  5. Play with the example. Good stuff, praise node some and the wunderground developers for opening a nice JSON API.

wundernode's People

Contributors

bacall213 avatar danh42 avatar devoncrouse avatar offsnore avatar patrickvalle avatar sebabromberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wundernode's Issues

Autocomplete

Can you integrate this as autocomplete with ability to pass all options?

http://www.wunderground.com/weather/api/d/docs?d=autocomplete-api

Example Query:

Request:

curl http://autocomplete.wunderground.com/aq?c=US&query=San%20Francisco,%20CA

Response:

{ "RESULTS": [ { "name": "San Francisco, California", "type": "city", "c": "US", "zmw": "94101.1.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:94101.1.99999" } ] }

We can then parse this array returned of "RESULTS" to get the proper zmw which we can then use in our queries to get accurate results, e.g. most of us would always use RESULTS[0].zmw.

add rawtide method

Can you please add this method to wundernode.js ??

that.rawtide = function (query, callback) {
    var path = "/rawtide/q/" + query + format;
    get(callback, null, path);
};

and

that.tide = function (query, callback) {
    var path = "/tide/q/" + query + format;
    get(callback, null, path);
};

Thanks :)

Publish latest version to NPM

The current version of the module on NPM does not include the semi-colon fix for Issue #4 provided in Commit 0b3c5f9 .

(This means Example.js is broken.)

Can you increment the version and publish up to NPM? Thanks!

Rate limiting

The example isn't terribly clear on what the last two parameters in new WunderNodeClient(apikey, debug, 10, 'minute'); mean, but it looks like it's using the limiter library to limit the request rate on API calls.

I've got an app making an identical call to wunder.conditions once a minute. I set rateCount: 10, rateTime: minute, which I assume means it would only make a request every 10 minutes, and then cache the results. However, about 10 hours later I got an email telling me I'd exceeded 500 requests. By my math, I should have only made 60 (every 10 minutes = 6 per hour * 10 hours). Am I misunderstanding those options, or is this a bug? Is it maybe 10 requests per minute?

wundernode usage

I am trying to use wundernode, changed the api and getting this error:
(not showing my api!)

node wundernode_example

reseting rate : 10 per minute
WunderNodeClient initialized, apikey: 12345, debug enbaled: true, rateCount: 10, rateTime: minute

Host:http://api.wunderground.com/api/12345

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: object is not a function
at Object.CALL_NON_FUNCTION (native)
at Object. (~/nodejs/wunderground/wunderground_example.js:28:11)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40

Any ideas?
here are my steps:

  1. express wunderground
    1. cd wunderground
  2. npm install
  3. npm install wundernode
  4. modified Example.js
  5. ran node wunderground_example.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.