43 lines
1.1 KiB
HTML
43 lines
1.1 KiB
HTML
<div class="section">
|
|
<h2><a href="/docs/#sdk">SDK</a> : Delete</h2>
|
|
|
|
<p><span class="font-semibold">Delete</span> lets your delete an item from a user's database. This API with will return a promise that gets resolved once the item has been durably deleted from the database.</p>
|
|
|
|
<pre>
|
|
<code class="language-javascript">userbase.delete(databaseName, itemId)
|
|
.then(() => {
|
|
// item deleted
|
|
})
|
|
.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 unique identifier of the item to delete.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3 id="errors">Errors</h3>
|
|
|
|
<ul>
|
|
<li>DatabaseNotOpen</li>
|
|
<li>DatabaseNameCannotBeBlank</li>
|
|
<li>DatabaseNameTooLong</li>
|
|
<li>DatabaseNameMustBeString</li>
|
|
<li>ItemIdCannotBeBlank</li>
|
|
<li>ItemIdMustBeString</li>
|
|
<li>ItemDoesNotExist</li>
|
|
<li>ItemUpdateConflict</li>
|
|
<li>AppIdNotSet</li>
|
|
<li>AppIdNotValid</li>
|
|
<li>ServiceUnavailable</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<hr> |