Skip to content

Commit

Permalink
feat(apiclient): support bulk parameters through nested array in API …
Browse files Browse the repository at this point in the history
…command
  • Loading branch information
KaiSchwarz-cnic committed Mar 11, 2020
1 parent 1cd1176 commit 1e4b8e7
Show file tree
Hide file tree
Showing 47 changed files with 168 additions and 127 deletions.
Binary file modified docs/_build/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/api/hexonet.apiconnector.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/api/hexonet.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/changelog.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/config.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/contactus.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/contributing.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/debugging.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/developmentguide.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/foreword.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/license.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/quickstart.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/upgrading.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 929c213e07c3ce3a0597219d54e5ca00
config: 01f686b72235abec0af6850908598e68
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 4 additions & 0 deletions docs/_build/html/_sources/developmentguide.rst.txt
Expand Up @@ -19,6 +19,7 @@ You can install them by
.. code-block:: bash
pip install -r requirements.txt --user
pip install . --user
NOTE: Make sure to have also all the extensions listed in the `docs/conf.py`
that are required for the SDK Documentation.
Expand Down Expand Up @@ -55,6 +56,9 @@ Try to auto-fix pep8 styling issues by
# to check for issues left
./scripts/pep8check.sh
# run unit tests
./scripts/coverage.sh
Pull Request (PR) Procedure
---------------------------
* fork our project and create a new branch.
Expand Down
6 changes: 5 additions & 1 deletion docs/_build/html/_static/basic.css
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}

div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}

div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
Expand Down
7 changes: 4 additions & 3 deletions docs/_build/html/_static/doctools.js
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -283,10 +283,11 @@ var Documentation = {
},

initOnKeyListeners: function() {
$(document).keyup(function(event) {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
Expand Down
1 change: 1 addition & 0 deletions docs/_build/html/_static/documentation_options.js
Expand Up @@ -3,6 +3,7 @@ var DOCUMENTATION_OPTIONS = {
VERSION: '3.1',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_static/language_data.js
Expand Up @@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
28 changes: 17 additions & 11 deletions docs/_build/html/_static/searchtools.js
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -63,6 +63,11 @@ var Search = {
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},

Expand Down Expand Up @@ -245,31 +250,32 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
var requestUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;

} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
}
listItem.append($('<a/>').attr('href',
requestUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
Expand Down Expand Up @@ -424,15 +430,15 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});

// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/api.html
Expand Up @@ -16,11 +16,11 @@
<title>SDK Documentation &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/api/hexonet.apiconnector.html
Expand Up @@ -16,11 +16,11 @@
<title>hexonet.apiconnector package &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="../_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/api/hexonet.html
Expand Up @@ -16,11 +16,11 @@
<title>hexonet package &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="../_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/changelog.html
Expand Up @@ -16,11 +16,11 @@
<title>Changelog &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down
22 changes: 11 additions & 11 deletions docs/_build/html/config.html
Expand Up @@ -16,11 +16,11 @@
<title>Configuration Handling &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -172,7 +172,7 @@ <h2>Configuration Basics<a class="headerlink" href="#configuration-basics" title
<span class="c1"># - Live System Account: https://www.hexonet.net/sign-up</span>
<span class="c1"># - Test/OT&amp;E System Account: https://www.hexonet.net/signup-ote</span>

<span class="k">print</span><span class="p">(</span><span class="s2">&quot;---- SESSIONLESS COMMUNICATION ----&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;---- SESSIONLESS COMMUNICATION ----&quot;</span><span class="p">)</span>
<span class="n">cl</span> <span class="o">=</span> <span class="n">AC</span><span class="p">()</span>
<span class="n">cl</span><span class="o">.</span><span class="n">useOTESystem</span><span class="p">()</span>
<span class="n">cl</span><span class="o">.</span><span class="n">setCredentials</span><span class="p">(</span><span class="s1">&#39;test.user&#39;</span><span class="p">,</span> <span class="s1">&#39;test.passw0rd&#39;</span><span class="p">)</span>
Expand Down Expand Up @@ -204,10 +204,10 @@ <h2>Configuration Basics<a class="headerlink" href="#configuration-basics" title
<span class="c1"># Get the response code and the response description</span>
<span class="n">code</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">getCode</span><span class="p">()</span>
<span class="n">description</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">getDescription</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">code</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span> <span class="o">+</span> <span class="n">description</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">code</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span> <span class="o">+</span> <span class="n">description</span><span class="p">)</span>

<span class="c1"># -------- SESSION-BASED COMMUNICATION -----------</span>
<span class="k">print</span><span class="p">(</span><span class="s2">&quot;---- SESSION-BASED COMMUNICATION ----&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;---- SESSION-BASED COMMUNICATION ----&quot;</span><span class="p">)</span>
<span class="n">cl</span> <span class="o">=</span> <span class="n">AC</span><span class="p">()</span>
<span class="n">cl</span><span class="o">.</span><span class="n">useOTESystem</span><span class="p">()</span>
<span class="n">cl</span><span class="o">.</span><span class="n">setCredentials</span><span class="p">(</span><span class="s1">&#39;test.user&#39;</span><span class="p">,</span> <span class="s1">&#39;test.passw0rd&#39;</span><span class="p">)</span>
Expand All @@ -218,18 +218,18 @@ <h2>Configuration Basics<a class="headerlink" href="#configuration-basics" title
<span class="c1"># cl.login(&#39;12345678&#39;); -&gt; 2FA: one time password</span>

<span class="k">if</span> <span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">isSuccess</span><span class="p">()):</span>
<span class="k">print</span><span class="p">(</span><span class="s2">&quot;LOGIN SUCCEEDED!&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;LOGIN SUCCEEDED!&quot;</span><span class="p">)</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">cl</span><span class="o">.</span><span class="n">request</span><span class="p">({</span>
<span class="s1">&#39;Command&#39;</span><span class="p">:</span> <span class="s2">&quot;QueryDomainList&quot;</span><span class="p">,</span> <span class="s1">&#39;limit&#39;</span><span class="p">:</span> <span class="mi">5</span>
<span class="p">})</span>
<span class="n">rplain</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">getPlain</span><span class="p">()</span>
<span class="n">code</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">getCode</span><span class="p">()</span>
<span class="n">description</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">getDescription</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">code</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span> <span class="o">+</span> <span class="n">description</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">code</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span> <span class="o">+</span> <span class="n">description</span><span class="p">)</span>
<span class="c1"># ... further commands ...</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">cl</span><span class="o">.</span><span class="n">logout</span><span class="p">()</span>
<span class="k">if</span> <span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">isSuccess</span><span class="p">()):</span>
<span class="k">print</span><span class="p">(</span><span class="s2">&quot;LOGOUT SUCCEEDED!&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;LOGOUT SUCCEEDED!&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/contactus.html
Expand Up @@ -16,11 +16,11 @@
<title>Contact Us &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down
10 changes: 5 additions & 5 deletions docs/_build/html/contributing.html
Expand Up @@ -16,11 +16,11 @@
<title>Contributing &#8212; hexonet.apiconnector 3.1 documentation</title>
<link rel="stylesheet" href="_static/guzzle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/hexonet-favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down

0 comments on commit 1e4b8e7

Please sign in to comment.