Skip to content

Commit

Permalink
manual search docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 13, 2019
1 parent 286d7e1 commit 03e5bb1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
Binary file modified build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified build/.doctrees/jibia_search.doctree
Binary file not shown.
8 changes: 6 additions & 2 deletions build/_sources/jibia_search.rst.txt
Expand Up @@ -43,10 +43,12 @@ Besides the token parameter, several other parameters can be set in the script t

Example of manual autocomplete handling
=============================

If you wish to have more control over what happens under the hood, instead you can write the logic for this yourself.
To do this you first have to load your product feed into Jibia. You can do that with the following request:

::

curl -X POST \
https://api.jibia.nl/api/initialize_search \
-H 'Content-Type: application/json' \
Expand All @@ -63,8 +65,8 @@ The autocomplete can be called with the following request:

::

curl -X GET \
'https://api.jibia.nl/api/do_search?query={QUERY}&token={TOKEN}&n={N}'
curl -X GET \
'https://api.jibia.nl/api/do_search?query={QUERY}&token={TOKEN}&n={N}'

.. glossary::

Expand All @@ -76,4 +78,6 @@ curl -X GET \

n
The amount of autocomplete results

This request will return a list of products.

23 changes: 11 additions & 12 deletions build/jibia_search.html
Expand Up @@ -180,24 +180,22 @@ <h1>Simple HTML Example<a class="headerlink" href="#simple-html-example" title="
<h1>Example of manual autocomplete handling<a class="headerlink" href="#example-of-manual-autocomplete-handling" title="Permalink to this headline"></a></h1>
<p>If you wish to have more control over what happens under the hood, instead you can write the logic for this yourself.
To do this you first have to load your product feed into Jibia. You can do that with the following request:</p>
<dl class="docutils">
<dt>::</dt>
<dd><dl class="first last docutils">
<dt>curl -X POST </dt>
<dd><a class="reference external" href="https://api.jibia.nl/api/initialize_search">https://api.jibia.nl/api/initialize_search</a> -H ‘Content-Type: application/json’ -d ‘{“feed_url”: FEED_URL}’</dd>
</dl>
</dd>
</dl>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">POST</span> \
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">api</span><span class="o">.</span><span class="n">jibia</span><span class="o">.</span><span class="n">nl</span><span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="n">initialize_search</span> \
<span class="o">-</span><span class="n">H</span> <span class="s1">&#39;Content-Type: application/json&#39;</span> \
<span class="o">-</span><span class="n">d</span> <span class="s1">&#39;{&quot;feed_url&quot;: FEED_URL}&#39;</span>
</pre></div>
</div>
<dl class="glossary docutils">
<dt id="term-feed-url">feed_url</dt>
<dd>The URL to your product feed.</dd>
</dl>
<p>This request returns a token you can use for the search. Save this token somewhere. It might take several minutes before your feed is fully initialized.</p>
<p>The autocomplete can be called with the following request:</p>
<dl class="docutils">
<dt>curl -X GET </dt>
<dd><a class="reference external" href="https://api.jibia.nl/api/do_search">https://api.jibia.nl/api/do_search</a>?query={QUERY}&amp;token={TOKEN}&amp;n={N}’</dd>
</dl>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">GET</span> \
<span class="s1">&#39;https://api.jibia.nl/api/do_search?query=</span><span class="si">{QUERY}</span><span class="s1">&amp;token=</span><span class="si">{TOKEN}</span><span class="s1">&amp;n=</span><span class="si">{N}</span><span class="s1">&#39;</span>
</pre></div>
</div>
<dl class="glossary docutils">
<dt id="term-query">query</dt>
<dd>The query for the autocomplete.</dd>
Expand All @@ -206,6 +204,7 @@ <h1>Example of manual autocomplete handling<a class="headerlink" href="#example-
<p class="last">The amount of autocomplete results</p>
</dd>
</dl>
<p>This request will return a list of products.</p>
</div>


Expand Down
2 changes: 1 addition & 1 deletion build/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions source/jibia_search.rst
Expand Up @@ -43,10 +43,12 @@ Besides the token parameter, several other parameters can be set in the script t

Example of manual autocomplete handling
=============================

If you wish to have more control over what happens under the hood, instead you can write the logic for this yourself.
To do this you first have to load your product feed into Jibia. You can do that with the following request:

::

curl -X POST \
https://api.jibia.nl/api/initialize_search \
-H 'Content-Type: application/json' \
Expand All @@ -63,8 +65,8 @@ The autocomplete can be called with the following request:

::

curl -X GET \
'https://api.jibia.nl/api/do_search?query={QUERY}&token={TOKEN}&n={N}'
curl -X GET \
'https://api.jibia.nl/api/do_search?query={QUERY}&token={TOKEN}&n={N}'

.. glossary::

Expand All @@ -76,4 +78,6 @@ curl -X GET \

n
The amount of autocomplete results

This request will return a list of products.

0 comments on commit 03e5bb1

Please sign in to comment.