//OpenWeatherMap-JQuery
(function( $ ) {
 
  var settings = {};
  var defer = $.Deferred();

  // Plugin definition.
  $.OpenWeatherMap = function( options ) {
    settings = options;
    getConditions(settings);
    return defer.promise();
  };

  function getConditions( options ){
    $.getJSON( "http://api.openweathermap.org/data/2.5/weather", settings )
    .done(function(data){
      $.extend(data, {
        isDay:( data.dt > data.sys.sunrise && data.dt < data.sys.sunset ) ? true : false
      });
      defer.resolve(data);
    })
    .fail(function(data){
      defer.reject(data);
    });
  }

})( jQuery );


//OpenWeatherMap-JQuery
(function( $ ) {
 
  var settings = {};
  var defer = null;

  // Plugin definition.
  $.OpenWeatherMap = function( options ) {
    settings = options;
    defer = $.Deferred();
    getConditions(settings);
    return defer.promise();
  };

  function getConditions( options ){
    $.getJSON( "http://api.openweathermap.org/data/2.5/weather", settings )
    .done(function(data){
      $.extend(data, {
        isDay:( data.dt > data.sys.sunrise && data.dt < data.sys.sunset ) ? true : false
      });
      defer.resolve(data);
    })
    .fail(function(data){
      defer.reject(data);
    });
  }

})( jQuery );


Update defer to work with multiple calls
Update defer to work with multiple calls

Updated the defer object to work when the plugin is called more than once.