Skip to content

Commit

Permalink
Remove createHuman; update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Jul 11, 2023
1 parent 31f186f commit 10862a4
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 301 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ elarian.on('reminder', (data, customer) => {
// ...
});

const humanId = 'abc';
const { state } = await elarian.leaseAppState(humanId);
const userId = 'abc...';
const { state } = await elarian.leaseAppState(userId);
const data = JSON.parse(state.stringVal);
await elarian.updateAppState(humanId, { stringVal: JSON.stringify({ ...data, status: 'good boy' }) });
await elarian.updateMetadata(humanId, { bio: { bytesVal: Buffer.from('age=29;gender=female') }});
await elarian.updateAppState(userId, { stringVal: JSON.stringify({ ...data, status: 'good boy' }) });
await elarian.updateMetadata(userId, { bio: { bytesVal: Buffer.from('age=29;gender=female') }});

```

Expand Down Expand Up @@ -72,4 +72,5 @@ If you find a bug, please file an issue on [our issue tracker on GitHub](https:/

## Known Issues

- Missing method to lease/get/fetch user metadata
- `resumable` connection options prevents app from connecting
2 changes: 1 addition & 1 deletion docs/Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Client.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:22:25 GMT+0300 (East Africa Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:39:58 GMT+0300 (East Africa Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
181 changes: 13 additions & 168 deletions docs/Elarian.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line44">line 44</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line42">line 42</a>
</li></ul></dd>


Expand Down Expand Up @@ -333,7 +333,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line160">line 160</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line115">line 115</a>
</li></ul></dd>


Expand Down Expand Up @@ -511,7 +511,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line107">line 107</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line62">line 62</a>
</li></ul></dd>


Expand Down Expand Up @@ -689,7 +689,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line263">line 263</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line218">line 218</a>
</li></ul></dd>


Expand Down Expand Up @@ -867,7 +867,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line220">line 220</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line175">line 175</a>
</li></ul></dd>


Expand Down Expand Up @@ -1036,161 +1036,6 @@ <h5>Returns:</h5>



<h4 class="name" id="createHuman"><span class="type-signature"></span>createHuman<span class="signature">(id)</span><span class="type-signature"> &rarr; {<a href="global.html#Reply">Reply</a>}</span></h4>






<div class="description">
<p>Create a human</p>
</div>









<h5>Parameters:</h5>


<table class="params">
<thead>
<tr>

<th>Name</th>


<th>Type</th>





<th class="last">Description</th>
</tr>
</thead>

<tbody>


<tr>

<td class="name"><code>id</code></td>


<td class="type">


<span class="param-type">string</span>



</td>





<td class="description last"><p>human id</p></td>
</tr>


</tbody>
</table>






<dl class="details">


























<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line63">line 63</a>
</li></ul></dd>







</dl>















<h5>Returns:</h5>




<dl>
<dt>
Type
</dt>
<dd>

<span class="param-type"><a href="global.html#Reply">Reply</a></span>


</dd>
</dl>













<h4 class="name" id="deleteAppState"><span class="type-signature"></span>deleteAppState<span class="signature">(id)</span><span class="type-signature"> &rarr; {<a href="global.html#StateReply">StateReply</a>}</span></h4>


Expand Down Expand Up @@ -1292,7 +1137,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line616">line 616</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line580">line 580</a>
</li></ul></dd>


Expand Down Expand Up @@ -1470,7 +1315,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line365">line 365</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line320">line 320</a>
</li></ul></dd>


Expand Down Expand Up @@ -1648,7 +1493,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line470">line 470</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line425">line 425</a>
</li></ul></dd>


Expand Down Expand Up @@ -2113,7 +1958,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line518">line 518</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line473">line 473</a>
</li></ul></dd>


Expand Down Expand Up @@ -2665,7 +2510,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line564">line 564</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line528">line 528</a>
</li></ul></dd>


Expand Down Expand Up @@ -2843,7 +2688,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line313">line 313</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line268">line 268</a>
</li></ul></dd>


Expand Down Expand Up @@ -3021,7 +2866,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line413">line 413</a>
<a href="elarian.js.html">elarian.js</a>, <a href="elarian.js.html#line368">line 368</a>
</li></ul></dd>


Expand Down Expand Up @@ -3091,7 +2936,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Client.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:22:25 GMT+0300 (East Africa Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:39:58 GMT+0300 (East Africa Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
12 changes: 0 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
* [Elarian](#Elarian)[<code>Client</code>](#Client)
* [new Elarian(config)](#new_Elarian_new)
* [.generateAuthToken()](#Elarian+generateAuthToken) ⇒ <code>AuthToken</code>
* [.createHuman(id)](#Elarian+createHuman) ⇒ <code>Reply</code>
* [.addReminder(id, reminder)](#Elarian+addReminder) ⇒ <code>Reply</code>
* [.addGroupReminder(group, reminder)](#Elarian+addGroupReminder) ⇒ <code>Reply</code>
* [.cancelReminder(id, reminder)](#Elarian+cancelReminder) ⇒ <code>Reply</code>
Expand Down Expand Up @@ -125,17 +124,6 @@
<p>Generate a short-lived auth token to use instead of apiKey. Used for browser and mobile clients.</p>

**Kind**: instance method of [<code>Elarian</code>](#Elarian)
<a name="Elarian+createHuman"></a>

### elarian.createHuman(id) ⇒ <code>Reply</code>
<p>Create a human</p>

**Kind**: instance method of [<code>Elarian</code>](#Elarian)

| Param | Type | Description |
| --- | --- | --- |
| id | <code>string</code> | <p>human id</p> |

<a name="Elarian+addReminder"></a>

### elarian.addReminder(id, reminder) ⇒ <code>Reply</code>
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Client.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:22:25 GMT+0300 (East Africa Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:39:58 GMT+0300 (East Africa Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/client.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Client.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:22:25 GMT+0300 (East Africa Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Tue Jul 11 2023 09:39:58 GMT+0300 (East Africa Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit 10862a4

Please sign in to comment.