Skip to content

Commit

Permalink
Clean up legacy feature; Prep simplified grpc interface
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Dec 11, 2023
1 parent 10862a4 commit f4b919d
Show file tree
Hide file tree
Showing 34 changed files with 464 additions and 20,106 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,24 @@ $ npm install elarian@latest

```javascript

// on node
const { initializeClient } = require('elarian');
/*
or in the browser
<script src="web.js"></script>
// or import { initializeClient } from 'elarian/web'
*/


// ...

const elarian = await initializeClient({
apiKey: 'YOUR_API_KEY', // or authToken: 'YOUR_AUTH_TOKEN'
orgId: 'YOUR_ORG_ID',
apiKey: 'YOUR_API_KEY',
appId: 'YOUR_APP_ID',
});

elarian.on('reminder', (data, customer) => {
elarian.on('consentDenied', (userId, data) => {
// ...
});

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

```

Expand Down
14 changes: 7 additions & 7 deletions docs/Client.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="client.js.html">client.js</a>, <a href="client.js.html#line31">line 31</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line15">line 15</a>
</li></ul></dd>


Expand Down Expand Up @@ -250,7 +250,7 @@ <h4 class="name" id="connect"><span class="type-signature"></span>connect<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line110">line 110</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line55">line 55</a>
</li></ul></dd>


Expand Down Expand Up @@ -360,7 +360,7 @@ <h4 class="name" id="disconnect"><span class="type-signature"></span>disconnect<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line171">line 171</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line71">line 71</a>
</li></ul></dd>


Expand Down Expand Up @@ -448,7 +448,7 @@ <h4 class="name" id="isConnected"><span class="type-signature"></span>isConnecte

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line164">line 164</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line64">line 64</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line337">line 337</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line163">line 163</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line322">line 322</a>
<a href="client.js.html">client.js</a>, <a href="client.js.html#line148">line 148</a>
</li></ul></dd>


Expand Down 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:39:58 GMT+0300 (East Africa Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Dec 11 2023 12:54:12 GMT+0300 (East Africa Time)
</footer>

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

0 comments on commit f4b919d

Please sign in to comment.