solarnetwork-d3.js
function sn_api_user_queueInstructionURL(topic, parameters) {
    var url = sn_api_user_baseURL(this) + "/instr/add?nodeId=" + this.nodeId + "&topic=" + encodeURIComponent(topic);
    if (Array.isArray(parameters)) {
      var i, len;
      for (i = 0, len = parameters.length; i < len; i++) {
        url += "&" + encodeURIComponent("parameters[" + i + "].name") + "=" + encodeURIComponent(parameters[i].name) + "&" + encodeURIComponent("parameters[" + i + "].value") + "=" + encodeURIComponent(parameters[i].value);
      }
    }
    return url;
  }
function sn_api_user_queueInstructionURL(topic, parameters) {
    var url = sn_api_user_baseURL(this) + "/instr/add?nodeId=" + this.nodeId + "&topic=" + encodeURIComponent(topic);
    if (Array.isArray(parameters)) {
      var i, len;
      for (i = 0, len = parameters.length; i < len; i++) {
        url += "&" + encodeURIComponent("parameters[" + i + "].name") + "=" + encodeURIComponent(parameters[i].name) + "&" + encodeURIComponent("parameters[" + i + "].value") + "=" + encodeURIComponent(parameters[i].value);
      }
    }
    return url;
  }
function sn_api_user_queueInstructionURL ( topic , parameters ) { var url = sn_api_user_baseURL ( this ) + "/instr/add?nodeId=" + this . nodeId + "&topic=" + encodeURIComponent ( topic ) ; if ( Array . isArray ( parameters ) ) { var i , len ; for ( i = 0 , len = parameters . length ; i < len ; i ++ ) { url += "&" + encodeURIComponent ( "parameters[" + i + "].name" ) + "=" + encodeURIComponent ( parameters [ i ] . name ) + "&" + encodeURIComponent ( "parameters[" + i + "].value" ) + "=" + encodeURIComponent ( parameters [ i ] . value ) ; } } return url ; }
Generate a URL for posting an instruction request.

@param {String} topic - The instruction topic.
@param {Array} parameters - An array of parameter objects in the form <code>{name:n1, value:v1}</code>.
@preserve
Generate a URL for posting an instruction request .