Skip to content

Commit

Permalink
Docs for stable 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
cabraviva committed Apr 24, 2023
1 parent a653351 commit 8d7fdb3
Show file tree
Hide file tree
Showing 21 changed files with 203 additions and 201 deletions.
2 changes: 1 addition & 1 deletion docs/functions/defineKnorryOptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/RequestOptions.html" class="tsd-signature-type tsd-kind-interface">RequestOptions</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L770">Documents/code/knorry/src/main.ts:770</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L770">src/main.ts:770</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/del.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L642">Documents/code/knorry/src/main.ts:642</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L642">src/main.ts:642</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L620">Documents/code/knorry/src/main.ts:620</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L620">src/main.ts:620</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L631">Documents/code/knorry/src/main.ts:631</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L631">src/main.ts:631</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/knorry.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L706">Documents/code/knorry/src/main.ts:706</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L706">src/main.ts:706</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L678">Documents/code/knorry/src/main.ts:678</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L678">src/main.ts:678</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/patch.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L692">Documents/code/knorry/src/main.ts:692</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L692">src/main.ts:692</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L654">Documents/code/knorry/src/main.ts:654</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L654">src/main.ts:654</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/put.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/KnorryResponse.html" class="tsd-signature-type tsd-kind-type-alias">KnorryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A Promise that resolves either with a primitive type containing the full response as the $res property or undefined</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/af86db3/src/main.ts#L666">Documents/code/knorry/src/main.ts:666</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/greencoder001/knorry/blob/a653351/src/main.ts#L666">src/main.ts:666</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
4 changes: 3 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ <h2>knorry</h2></div>
<pre><code class="language-js"><span class="hl-4">import</span><span class="hl-0"> { </span><span class="hl-5">get</span><span class="hl-0">, </span><span class="hl-5">post</span><span class="hl-0"> } </span><span class="hl-4">from</span><span class="hl-0"> </span><span class="hl-1">&#39;knorry&#39;</span>
</code><button>Copy</button></pre>
<p>Now you can make requests like this:</p>
<pre><code class="language-js">
<pre><code class="language-js"><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-3">res</span><span class="hl-0"> = </span><span class="hl-4">await</span><span class="hl-0"> </span><span class="hl-6">get</span><span class="hl-0">(</span><span class="hl-1">&#39;example-api.com&#39;</span><span class="hl-0">)</span><br/><span class="hl-5">console</span><span class="hl-0">.</span><span class="hl-6">log</span><span class="hl-0">(</span><span class="hl-5">res</span><span class="hl-0">.</span><span class="hl-6">$plain</span><span class="hl-0">())</span><br/><span class="hl-8">// res -&gt; String { &#39;response&#39;, $res: ... }</span>
</code><button>Copy</button></pre>
<p>Alternatively you could use the default export:</p>
<pre><code class="language-js"><span class="hl-4">import</span><span class="hl-0"> </span><span class="hl-5">knorry</span><span class="hl-0"> </span><span class="hl-4">from</span><span class="hl-0"> </span><span class="hl-1">&#39;knorry&#39;</span><br/><span class="hl-6">knorry</span><span class="hl-0">(</span><span class="hl-1">&#39;POST&#39;</span><span class="hl-0">, </span><span class="hl-1">&#39;example.com&#39;</span><span class="hl-0">, {</span><br/><span class="hl-0"> </span><span class="hl-5">key:</span><span class="hl-0"> </span><span class="hl-1">&#39;value&#39;</span><br/><span class="hl-0">}, {</span><br/><span class="hl-0"> </span><span class="hl-5">headers:</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">myHeader:</span><span class="hl-0"> </span><span class="hl-1">&#39;12345&#39;</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">})</span>
</code><button>Copy</button></pre>
<a id="md:docs" class="tsd-anchor"></a><h1><a href="#md:docs">Docs</a></h1><p>If you want to see a full documentation take a look at <a href="https://greencoder001.github.io/knorry/">this</a></p>
<a id="md:some-things-to-keep-in-mind-when-using-knorry" class="tsd-anchor"></a><h1><a href="#md:some-things-to-keep-in-mind-when-using-knorry">Some things to keep in mind when using knorry</a></h1><a id="md:easy-mode" class="tsd-anchor"></a><h2><a href="#md:easy-mode">Easy mode</a></h2><p>By default knorry will use easy mode, which you can disable like this:</p>
<pre><code class="language-js"><span class="hl-4">import</span><span class="hl-0"> { </span><span class="hl-5">defineKnorryOptions</span><span class="hl-0">, </span><span class="hl-5">get</span><span class="hl-0"> } </span><span class="hl-4">from</span><span class="hl-0"> </span><span class="hl-1">&#39;knorry&#39;</span><br/><span class="hl-6">defineKnorryOptions</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-5">easyMode:</span><span class="hl-0"> </span><span class="hl-2">false</span><br/><span class="hl-0">})</span><br/><br/><span class="hl-8">// Or temporarily disable it for one request</span><br/><span class="hl-4">await</span><span class="hl-0"> </span><span class="hl-6">get</span><span class="hl-0">(</span><span class="hl-1">&#39;example.com&#39;</span><span class="hl-0">, {</span><br/><span class="hl-0"> </span><span class="hl-5">easyMode:</span><span class="hl-0"> </span><span class="hl-2">false</span><br/><span class="hl-0">})</span>
</code><button>Copy</button></pre>
Expand Down Expand Up @@ -105,6 +106,7 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.9389
<li><a href="#md:why"><span>Why?</span></a></li>
<li><a href="#md:installation"><span>Installation</span></a></li>
<li><a href="#md:usage"><span>Usage</span></a></li>
<li><a href="#md:docs"><span>Docs</span></a></li>
<li><a href="#md:some-things-to-keep-in-mind-when-using-knorry"><span>Some things to keep in mind when using knorry</span></a></li>
<li>
<ul>
Expand Down
Loading

0 comments on commit 8d7fdb3

Please sign in to comment.