var request = require('browser-request');var odin={}; odin.post={}; odin.get={}; odin.post.weathertargeting = {}; odin.post.weathertargeting.weathertargeting_RPC = {}; odin.post.weathertargeting.weathertargeting_RPC.weatherTargeting = function weatherTargeting (id,cb) { var _args = Array.prototype.slice.call(arguments); var _cb = _args.pop(); var isNode = false; if (typeof process === 'object') { if (typeof process.versions === 'object') { if (typeof process.versions.node !== 'undefined') { isNode = true; } } } var options = {}; if(isNode) { options = { method:'post', url: '/rpcExec', json: {functionName:"weathertargeting/weathertargeting_RPC/weatherTargeting", args:_args} } }else { options = { method:'post', url: '/rpcExec', body: JSON.stringify({functionName:"weathertargeting/weathertargeting_RPC/weatherTargeting", args:_args}), json:true } } request(options, function(err, res, body){ if(body.reject != null) { delete body.accept; throw new Error(JSON.stringify(body)); } else { _cb(body.accept); } }); }; ; odin.get.weathertargeting = {}; odin.get.weathertargeting.weathertargeting_RPC = {}; odin.get.weathertargeting.weathertargeting_RPC.weatherTargeting = function weatherTargeting (id,cb) { var _args = Array.prototype.slice.call(arguments); var _cb = _args.pop(); var isNode = false; if (typeof process === 'object') { if (typeof process.versions === 'object') { if (typeof process.versions.node !== 'undefined') { isNode = true; } } } var options = {}; if(isNode) { options = { method:'get', url: '/rpcExec?path=weathertargeting/weathertargeting_RPC/weatherTargeting&args='+_args.toString(), json: {functionName:"weathertargeting/weathertargeting_RPC/weatherTargeting", args:_args} } }else { options = { method:'get', url: '/rpcExec?path=weathertargeting/weathertargeting_RPC/weatherTargeting&args='+_args.toString(), body: JSON.stringify({functionName:"weathertargeting/weathertargeting_RPC/weatherTargeting", args:_args}), json:true } } request(options, function(err, res, body){ if(body.reject != null) { delete body.accept; throw new Error(JSON.stringify(body)); } else { _cb(body.accept); } }); }; ;