examples/api-samples/public/docs/sample16.html in groupdocs-1.6.0 vs examples/api-samples/public/docs/sample16.html in groupdocs-1.7.0

- old
+ new

@@ -29,13 +29,13 @@ </div> <p>GET request</p> </div> - <div class="content"><div class='highlight'><pre>get <span class="string">'/sample16'</span> <span class="keyword">do</span> - haml <span class="symbol">:sample16</span> -<span class="keyword">end</span></pre></div></div> + <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span> + haml <span class="hljs-symbol">:sample16</span> +<span class="hljs-keyword">end</span></pre></div></div> </li> <li id="section-2"> @@ -46,11 +46,11 @@ </div> <p>POST request</p> </div> - <div class="content"><div class='highlight'><pre>post <span class="string">'/sample16'</span> <span class="keyword">do</span></pre></div></div> + <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span></pre></div></div> </li> <li id="section-3"> @@ -61,14 +61,14 @@ </div> <p>Set variables</p> </div> - <div class="content"><div class='highlight'><pre> set <span class="symbol">:fileId</span>, params[<span class="symbol">:fileId</span>] - set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>] + <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>] + set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>] - <span class="keyword">begin</span></pre></div></div> + <span class="hljs-keyword">begin</span></pre></div></div> </li> <li id="section-4"> @@ -79,11 +79,11 @@ </div> <p>Check required variables</p> </div> - <div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.fileId.empty?</pre></div></div> + <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.fileId.empty?</pre></div></div> </li> <li id="section-5"> @@ -94,17 +94,17 @@ </div> <p>Prepare base path</p> </div> - <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty? - base_path = <span class="string">'https://api.groupdocs.com'</span> - <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>) - base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>] - <span class="keyword">else</span> + <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty? + base_path = <span class="hljs-string">'https://api.groupdocs.com'</span> + <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>) + base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>] + <span class="hljs-keyword">else</span> base_path = settings.base_path - <span class="keyword">end</span></pre></div></div> + <span class="hljs-keyword">end</span></pre></div></div> </li> <li id="section-6"> @@ -115,11 +115,11 @@ </div> <p>Configure your access to API server</p> </div> - <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs| + <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs| groupdocs.client_id = settings.client_id groupdocs.private_key = settings.private_key</pre></div></div> </li> @@ -132,12 +132,12 @@ </div> <p>Optionally specify API server and version</p> </div> - <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span> - <span class="keyword">end</span></pre></div></div> + <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span> + <span class="hljs-keyword">end</span></pre></div></div> </li> <li id="section-8"> @@ -148,11 +148,11 @@ </div> <p>Prepare to sign url</p> </div> - <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/assembly2/questionnaire-assembly/<span class="subst">#{settings.fileId}</span>"</span></pre></div></div> + <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/assembly2/questionnaire-assembly/<span class="hljs-subst">#{settings.fileId}</span>"</span></pre></div></div> </li> <li id="section-9"> @@ -163,11 +163,11 @@ </div> <p>Construct result string</p> </div> - <div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div> + <div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div> </li> <li id="section-10"> @@ -178,18 +178,18 @@ </div> <p>Generate iframe URL</p> </div> - <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.base_path - <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span> - iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span> - <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span> - iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span> - <span class="keyword">else</span> - iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span> - <span class="keyword">end</span></pre></div></div> + <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.base_path + <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span> + iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span> + <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span> + iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span> + <span class="hljs-keyword">else</span> + iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span> + <span class="hljs-keyword">end</span></pre></div></div> </li> <li id="section-11"> @@ -200,15 +200,15 @@ </div> <p>Make iframe</p> </div> - <div class="content"><div class='highlight'><pre> iframe = <span class="string">"&lt;iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span> + <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"&lt;iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span> - <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e + <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e err = e.message - <span class="keyword">end</span></pre></div></div> + <span class="hljs-keyword">end</span></pre></div></div> </li> <li id="section-12"> @@ -219,11 +219,11 @@ </div> <p>set variables for template</p> </div> - <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample16</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:fileId</span> =&gt; settings.fileId, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:err</span> =&gt; err} -<span class="keyword">end</span></pre></div></div> + <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample16</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:fileId</span> =&gt; settings.fileId, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:err</span> =&gt; err} +<span class="hljs-keyword">end</span></pre></div></div> </li> </ul> </div>