Add docs
This commit is contained in:
43
src/pages/docs_sdk_insert.html
Normal file
43
src/pages/docs_sdk_insert.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="section">
|
||||
<h2><a href="/docs">Docs</a> : <a href="/docs/sdk">SDK</a> : Insert</h2>
|
||||
|
||||
<p><span class="font-semibold">Insert</span> lets your add items to a user's database. This API with will return a promise that gets resolved once the item has been durably inserted into the database.</p>
|
||||
|
||||
<pre>
|
||||
<code class="language-javascript">userbase.insert(databaseName, itemId, item)
|
||||
.then(() => {
|
||||
// item inserted
|
||||
})
|
||||
.catch((e) => console.error(e))</code>
|
||||
</pre>
|
||||
|
||||
<h3 id="params">Parameters</h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<span class="field">databaseName</span> [string | Len: 1-50] - The database name to use.
|
||||
</li>
|
||||
<li>
|
||||
<span class="field">itemId</span> [string | Len: 1-100] - The item's unique identifier.
|
||||
</li>
|
||||
<li>
|
||||
<span class="field">item</span> [object | Max size: 100KB] - The item to insert.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="errors">Errors</h3>
|
||||
|
||||
<ul>
|
||||
<li>DatabaseNotOpen</li>
|
||||
<li>ItemIdCannotBeBlank</li>
|
||||
<li>ItemIdTooLong</li>
|
||||
<li>ItemIdMustBeString</li>
|
||||
<li>ItemTooLarge</li>
|
||||
<li>ItemAlreadyExists</li>
|
||||
<li>AppIdNotSet</li>
|
||||
<li>ServiceUnavailable</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
Reference in New Issue
Block a user