examples/api-samples/public/docs/sample01.html in groupdocs-1.6.0 vs examples/api-samples/public/docs/sample01.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">'/sample01'</span> <span class="keyword">do</span>
- haml <span class="symbol">:sample01</span>
-<span class="keyword">end</span></pre></div></div>
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-1-how-to-login-to-groupdocs-using-the-api'</span> <span class="hljs-keyword">do</span>
+ haml <span class="hljs-symbol">:sample01</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">'/sample01'</span> <span class="keyword">do</span></pre></div></div>
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-1-how-to-login-to-groupdocs-using-the-api'</span> <span class="hljs-keyword">do</span></pre></div></div>
</li>
<li id="section-3">
@@ -61,15 +61,15 @@
</div>
<p>Set variables</p>
</div>
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</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">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</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">
@@ -80,17 +80,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-5">
@@ -101,11 +101,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>
@@ -118,12 +118,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-7">
@@ -134,11 +134,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.client_id.empty? <span class="keyword">or</span> settings.private_key.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.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
</li>
<li id="section-8">
@@ -149,15 +149,15 @@
</div>
<p>Make a request to API using client_id and private_key</p>
</div>
- <div class="content"><div class='highlight'><pre> user = <span class="constant">GroupDocs::User</span>.get!()
+ <div class="content"><div class='highlight'><pre> user = <span class="hljs-constant">GroupDocs::User</span>.get!()
- <span class="keyword">rescue</span> <span class="constant">Exception</span> => e
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => 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-9">
@@ -168,11 +168,11 @@
</div>
<p>Set variables for template</p>
</div>
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample01</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:user</span> => user, <span class="symbol">:err</span> => err}
-<span class="keyword">end</span></pre></div></div>
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample01</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:user</span> => user, <span class="hljs-symbol">:err</span> => err}
+<span class="hljs-keyword">end</span></pre></div></div>
</li>
</ul>
</div>