YR / MMM-YrNow

23 stars 28 forks source link

Support for multiple instances #10

Closed Arve closed 5 years ago

Arve commented 6 years ago

This request contains a number of small fixes:

The bigger change is that I've added support for multiple instances:

  1. It now also queries the base url for a location, e.g https://www.yr.no/api/v0/locations/1-123456/ to get the place name. This is done once only for each module instance
  2. For all socket notifications, the forecastUrl is passed along. node_helper.js stores each instance's passed configuration in an array using the URL as key. Each module instance further only listens to its own forecastUrl when the helper emits them.

I hope this change is a useful one for you.