<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: IntegrationHelper — Documentation by YARD 0.8.7.6 </title> <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" /> <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = ''; framesUrl = "frames.html#!IntegrationHelper.html"; </script> <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="_index.html">Index (I)</a> » <span class="title">IntegrationHelper</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="file_list.html"> File List </a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Class: IntegrationHelper </h1> <dl class="box"> <dt class="r1">Inherits:</dt> <dd class="r1"> <span class="inheritName">Object</span> <ul class="fullTree"> <li>Object</li> <li class="next">IntegrationHelper</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> <dt class="r2">Includes:</dt> <dd class="r2"><span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span>, <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></dd> <dt class="r1 last">Defined in:</dt> <dd class="r1 last">IntegrationHelper.rb</dd> </dl> <div class="clear"></div> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#getIntegration-instance_method" title="#getIntegration (instance method)">- (Object) <strong>getIntegration</strong>(jsonParams, integrationHash) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#getService-instance_method" title="#getService (instance method)">- (Object) <strong>getService</strong>(jsonParams) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#initialize-instance_method" title="#initialize (instance method)">- (IntegrationHelper) <strong>initialize</strong> </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'> <p>A new instance of IntegrationHelper.</p> </div></span> </li> </ul> <h3 class="inherited">Methods included from <span class='object_link'><a href="Util.html" title="Util (module)">Util</a></span></h3> <p class="inherited"><span class='object_link'><a href="Util.html#getJSONArgs-class_method" title="Util.getJSONArgs (method)">getJSONArgs</a></span>, <span class='object_link'><a href="Util.html#log-class_method" title="Util.log (method)">log</a></span>, <span class='object_link'><a href="Util.html#logClose-class_method" title="Util.logClose (method)">logClose</a></span>, <span class='object_link'><a href="Util.html#logInit-class_method" title="Util.logInit (method)">logInit</a></span>, <span class='object_link'><a href="Util.html#logIt-class_method" title="Util.logIt (method)">logIt</a></span>, <span class='object_link'><a href="Util.html#openJSONFile-class_method" title="Util.openJSONFile (method)">openJSONFile</a></span></p> <h3 class="inherited">Methods included from <span class='object_link'><a href="CloudmunchService.html" title="CloudmunchService (module)">CloudmunchService</a></span></h3> <p class="inherited"><span class='object_link'><a href="CloudmunchService.html#deleteCloudmunchData-instance_method" title="CloudmunchService#deleteCloudmunchData (method)">#deleteCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#deleteKeys-instance_method" title="CloudmunchService#deleteKeys (method)">#deleteKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#downloadKeys-instance_method" title="CloudmunchService#downloadKeys (method)">#downloadKeys</a></span>, <span class='object_link'><a href="CloudmunchService.html#generateServerURL-instance_method" title="CloudmunchService#generateServerURL (method)">#generateServerURL</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCloudmunchData-instance_method" title="CloudmunchService#getCloudmunchData (method)">#getCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#getCustomDataContext-class_method" title="CloudmunchService.getCustomDataContext (method)">getCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#getDataForContext-instance_method" title="CloudmunchService#getDataForContext (method)">#getDataForContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_get-class_method" title="CloudmunchService.http_get (method)">http_get</a></span>, <span class='object_link'><a href="CloudmunchService.html#http_post-class_method" title="CloudmunchService.http_post (method)">http_post</a></span>, <span class='object_link'><a href="CloudmunchService.html#parseResponse-instance_method" title="CloudmunchService#parseResponse (method)">#parseResponse</a></span>, <span class='object_link'><a href="CloudmunchService.html#putCustomDataContext-class_method" title="CloudmunchService.putCustomDataContext (method)">putCustomDataContext</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateCloudmunchData-instance_method" title="CloudmunchService#updateCloudmunchData (method)">#updateCloudmunchData</a></span>, <span class='object_link'><a href="CloudmunchService.html#updateDataForContext-instance_method" title="CloudmunchService#updateDataForContext (method)">#updateDataForContext</a></span></p> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> - (<tt><span class='object_link'><a href="" title="IntegrationHelper (class)">IntegrationHelper</a></span></tt>) <strong>initialize</strong> </h3><div class="docstring"> <div class="discussion"> <p>Returns a new instance of IntegrationHelper</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 22 23</pre> </td> <td> <pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 22</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="getIntegration-instance_method"> - (<tt>Object</tt>) <strong>getIntegration</strong>(jsonParams, integrationHash) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64</pre> </td> <td> <pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 47</span> <span class='kw'>def</span> <span class='id identifier rubyid_getIntegration'>getIntegration</span><span class='lparen'>(</span><span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='comma'>,</span> <span class='id identifier rubyid_integrationHash'>integrationHash</span><span class='rparen'>)</span> <span class='id identifier rubyid_providerName'>providerName</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>providername</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DEBUG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Provider Name: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='rparen'>)</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_chop'>chop</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>then</span> <span class='id identifier rubyid_regFields'>regFields</span> <span class='op'>=</span> <span class='id identifier rubyid_integrationHash'>integrationHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_providerName'>providerName</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>configuration</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='id identifier rubyid_regFields'>regFields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span> <span class='kw'>return</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='kw'>else</span> <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="getService-instance_method"> - (<tt>Object</tt>) <strong>getService</strong>(jsonParams) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44</pre> </td> <td> <pre class="code"><span class="info file"># File 'IntegrationHelper.rb', line 25</span> <span class='kw'>def</span> <span class='id identifier rubyid_getService'>getService</span><span class='lparen'>(</span><span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='rparen'>)</span> <span class='id identifier rubyid_cloudproviders'>cloudproviders</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cloudproviders</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='id identifier rubyid_cloudproviders'>cloudproviders</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_cloudproviders'>cloudproviders</span><span class='rparen'>)</span> <span class='id identifier rubyid_providerName'>providerName</span> <span class='op'>=</span> <span class='id identifier rubyid_jsonParams'>jsonParams</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>providername</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DEBUG</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Provider Name: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='rparen'>)</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_providerName'>providerName</span><span class='period'>.</span><span class='id identifier rubyid_chop'>chop</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>then</span> <span class='id identifier rubyid_regFields'>regFields</span> <span class='op'>=</span> <span class='id identifier rubyid_cloudproviders'>cloudproviders</span><span class='lbracket'>[</span><span class='id identifier rubyid_providerName'>providerName</span><span class='rbracket'>]</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='id identifier rubyid_regFields'>regFields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span> <span class='kw'>return</span> <span class='id identifier rubyid_integrationDetailsHash'>integrationDetailsHash</span> <span class='kw'>else</span> <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Mon Jan 11 14:09:53 2016 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.7.6 (ruby-2.0.0). </div> </body> </html>