Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Harley Alexander committed Aug 17, 2019
1 parent daced79 commit 81e8698
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 530 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

> Easy as hooks that integrate with the [pusher-js](https://github.com/pusher/pusher-js) library.
[![NPM](https://img.shields.io/npm/v/react-pusher-hooks.svg)](https://www.npmjs.com/package/react-pusher-hooks) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![NPM](https://img.shields.io/npm/v/use-pusher.svg)](https://www.npmjs.com/package/react-pusher-hooks) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
yarn add use-pusher
```

##### [API Reference/Docs](https://mayteio.github.io/use-pusher/)

## Usage

You must wrap your app with a `PusherProvider` and pass it config props for [pusher-js](https://github.com/pusher/pusher-js) initialisation initialisation.
Expand Down Expand Up @@ -134,10 +136,6 @@ const Example = () => {

This project was built using typescript, so types are built-in. Yeeeew!

## API Reference

TODO

## License

MIT © [@mayteio](https://github.com/@mayteio)
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions docs/classes/_mocks_.channelmock.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3>bind</h3>
<div class="tsd-signature tsd-kind-icon">bind<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Mock</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;jest.fn((eventName: string, onEvent: any) &#x3D;&gt; {this.binding.onEvent &#x3D; onEvent;this.binding.eventType &#x3D; eventName;})</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L16">mocks.ts:16</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L16">mocks.ts:16</a></li>
</ul>
</aside>
</section>
Expand All @@ -116,7 +116,7 @@ <h3>emit</h3>
<div class="tsd-signature tsd-kind-icon">emit<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Mock</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;jest.fn((eventName: string, data: any) &#x3D;&gt; {if (this.binding.onEvent !&#x3D;&#x3D; undefined &amp;&amp;this.binding.eventType &#x3D;&#x3D;&#x3D; eventName) {this.binding.onEvent(data);}})</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L8">mocks.ts:8</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L8">mocks.ts:8</a></li>
</ul>
</aside>
</section>
Expand All @@ -126,7 +126,7 @@ <h3>unbind</h3>
<div class="tsd-signature tsd-kind-icon">unbind<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Mock</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;jest.fn(() &#x3D;&gt; {this.binding.onEvent &#x3D; undefined;this.binding.eventType &#x3D; undefined;})</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L20">mocks.ts:20</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L20">mocks.ts:20</a></li>
</ul>
</aside>
</section>
Expand All @@ -139,7 +139,7 @@ <h3>binding</h3>
<div class="tsd-signature tsd-kind-icon">binding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L4">mocks.ts:4</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L4">mocks.ts:4</a></li>
</ul>
</aside>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-object-literal">
Expand All @@ -148,7 +148,7 @@ <h3>event<wbr>Type</h3>
<div class="tsd-signature tsd-kind-icon">event<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> =&nbsp;undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L5">mocks.ts:5</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L5">mocks.ts:5</a></li>
</ul>
</aside>
</section>
Expand All @@ -158,7 +158,7 @@ <h3>on<wbr>Event</h3>
<div class="tsd-signature tsd-kind-icon">on<wbr>Event<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> =&nbsp;undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L6">mocks.ts:6</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L6">mocks.ts:6</a></li>
</ul>
</aside>
</section>
Expand All @@ -174,12 +174,6 @@ <h3>on<wbr>Event</h3>
<li class=" tsd-kind-external-module">
<a href="../modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_index_.html">"index"</a>
</li>
<li class="current tsd-kind-external-module">
<a href="../modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
16 changes: 5 additions & 11 deletions docs/classes/_mocks_.pushermock.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L28">mocks.ts:28</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L28">mocks.ts:28</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -136,7 +136,7 @@ <h3>client<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">client<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L27">mocks.ts:27</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L27">mocks.ts:27</a></li>
</ul>
</aside>
</section>
Expand All @@ -146,7 +146,7 @@ <h3>config</h3>
<div class="tsd-signature tsd-kind-icon">config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Config</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L28">mocks.ts:28</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L28">mocks.ts:28</a></li>
</ul>
</aside>
</section>
Expand All @@ -156,7 +156,7 @@ <h3>subscribe</h3>
<div class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Mock</span><span class="tsd-signature-symbol">&lt;</span><a href="_mocks_.channelmock.html" class="tsd-signature-type">ChannelMock</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;jest.fn(() &#x3D;&gt; new ChannelMock())</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L35">mocks.ts:35</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L35">mocks.ts:35</a></li>
</ul>
</aside>
</section>
Expand All @@ -166,7 +166,7 @@ <h3>unsubscribe</h3>
<div class="tsd-signature tsd-kind-icon">unsubscribe<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Mock</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;jest.fn()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/mocks.ts#L36">mocks.ts:36</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/mocks.ts#L36">mocks.ts:36</a></li>
</ul>
</aside>
</section>
Expand All @@ -181,12 +181,6 @@ <h3>unsubscribe</h3>
<li class=" tsd-kind-external-module">
<a href="../modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_index_.html">"index"</a>
</li>
<li class="current tsd-kind-external-module">
<a href="../modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
8 changes: 0 additions & 8 deletions docs/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ <h2>Index</h2>
<h3>External modules</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-external-module"><a href="modules/_pusherprovider_.html" class="tsd-kind-icon">"<wbr>Pusher<wbr>Provider"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_helpers_.html" class="tsd-kind-icon">"helpers"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_index_.html" class="tsd-kind-icon">"index"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_mocks_.html" class="tsd-kind-icon">"mocks"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_types_.html" class="tsd-kind-icon">"types"</a></li>
<li class="tsd-kind-external-module"><a href="modules/_usechannel_.html" class="tsd-kind-icon">"use<wbr>Channel"</a></li>
Expand All @@ -93,12 +91,6 @@ <h3>External modules</h3>
<li class=" tsd-kind-external-module">
<a href="modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_index_.html">"index"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
15 changes: 4 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ <h1>use-pusher</h1>
<blockquote>
<p>Easy as hooks that integrate with the <a href="https://github.com/pusher/pusher-js">pusher-js</a> library.</p>
</blockquote>
<p><a href="https://www.npmjs.com/package/react-pusher-hooks"><img src="https://img.shields.io/npm/v/react-pusher-hooks.svg" alt="NPM"></a> <a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="JavaScript Style Guide"></a></p>
<p><a href="https://www.npmjs.com/package/react-pusher-hooks"><img src="https://img.shields.io/npm/v/use-pusher.svg" alt="NPM"></a> <a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="JavaScript Style Guide"></a></p>
<a href="#install" id="install" style="color: inherit; text-decoration: none;">
<h2>Install</h2>
</a>
<pre><code class="language-bash">yarn add use-pusher</code></pre>
<a href="#a-hrefhttpsmayteiogithubiouse-pusherapi-referencedocsa" id="a-hrefhttpsmayteiogithubiouse-pusherapi-referencedocsa" style="color: inherit; text-decoration: none;">
<h5><a href="https://mayteio.github.io/use-pusher/">API Reference/Docs</a></h5>
</a>
<a href="#usage" id="usage" style="color: inherit; text-decoration: none;">
<h2>Usage</h2>
</a>
Expand Down Expand Up @@ -180,10 +183,6 @@ <h2>Trigger Server</h2>
<h2>Typescript</h2>
</a>
<p>This project was built using typescript, so types are built-in. Yeeeew!</p>
<a href="#api-reference" id="api-reference" style="color: inherit; text-decoration: none;">
<h2>API Reference</h2>
</a>
<p>TODO</p>
<a href="#license" id="license" style="color: inherit; text-decoration: none;">
<h2>License</h2>
</a>
Expand All @@ -201,12 +200,6 @@ <h2>License</h2>
<li class=" tsd-kind-external-module">
<a href="modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_index_.html">"index"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
12 changes: 3 additions & 9 deletions docs/interfaces/_types_.pushercontextvalues.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> client</h3>
<div class="tsd-signature tsd-kind-icon">client<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L5">types.ts:5</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L5">types.ts:5</a></li>
</ul>
</aside>
</section>
Expand All @@ -110,7 +110,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> pusher<wbr>Options</h
<div class="tsd-signature tsd-kind-icon">pusher<wbr>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Config</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L7">types.ts:7</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L7">types.ts:7</a></li>
</ul>
</aside>
</section>
Expand All @@ -120,7 +120,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> trigger<wbr>Endpoint<
<div class="tsd-signature tsd-kind-icon">trigger<wbr>Endpoint<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L6">types.ts:6</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L6">types.ts:6</a></li>
</ul>
</aside>
</section>
Expand All @@ -135,12 +135,6 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> trigger<wbr>Endpoint<
<li class=" tsd-kind-external-module">
<a href="../modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_index_.html">"index"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
18 changes: 6 additions & 12 deletions docs/interfaces/_types_.pusherproviderprops.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> auth</h3>
<aside class="tsd-sources">
<p>Overrides Config.auth</p>
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L14">types.ts:14</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L14">types.ts:14</a></li>
</ul>
</aside>
</section>
Expand All @@ -155,7 +155,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> auth<wbr>Endpoint</h3
<aside class="tsd-sources">
<p>Overrides Config.authEndpoint</p>
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L13">types.ts:13</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L13">types.ts:13</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -198,7 +198,7 @@ <h3>children</h3>
<div class="tsd-signature tsd-kind-icon">children<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ReactNode</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L16">types.ts:16</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L16">types.ts:16</a></li>
</ul>
</aside>
</section>
Expand All @@ -208,7 +208,7 @@ <h3>client<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">client<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L11">types.ts:11</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L11">types.ts:11</a></li>
</ul>
</aside>
</section>
Expand All @@ -219,7 +219,7 @@ <h3>cluster</h3>
<aside class="tsd-sources">
<p>Overrides Config.cluster</p>
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L12">types.ts:12</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L12">types.ts:12</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -386,7 +386,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> trigger<wbr>Endpoint<
<div class="tsd-signature tsd-kind-icon">trigger<wbr>Endpoint<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/005d78c/src/types.ts#L15">types.ts:15</a></li>
<li>Defined in <a href="https://github.com/mayteio/use-pusher/blob/daced79/src/types.ts#L15">types.ts:15</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -445,12 +445,6 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> wss<wbr>Port</h3>
<li class=" tsd-kind-external-module">
<a href="../modules/_pusherprovider_.html">"<wbr>Pusher<wbr>Provider"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_helpers_.html">"helpers"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_index_.html">"index"</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/_mocks_.html">"mocks"</a>
</li>
Expand Down
Loading

0 comments on commit 81e8698

Please sign in to comment.