rtm-api
Version:
Remember the Milk API Interface
1,028 lines (243 loc) • 15 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>RTMError - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="RTMClient.html">RTMClient</a><ul class='methods'><li data-type='method'><a href="RTMClient.html#get">get</a></li><li data-type='method'><a href="RTMClient.html#~auth/getAuthToken">auth/getAuthToken</a></li><li data-type='method'><a href="RTMClient.html#~auth/getAuthUrl">auth/getAuthUrl</a></li><li data-type='method'><a href="RTMClient.html#~auth/verifyAuthToken">auth/verifyAuthToken</a></li><li data-type='method'><a href="RTMClient.html#~user/create">user/create</a></li><li data-type='method'><a href="RTMClient.html#~user/export">user/export</a></li><li data-type='method'><a href="RTMClient.html#~user/exportToString">user/exportToString</a></li><li data-type='method'><a href="RTMClient.html#~user/import">user/import</a></li><li data-type='method'><a href="RTMClient.html#~user/importFromString">user/importFromString</a></li></ul></li><li><a href="RTMError.html">RTMError</a><ul class='methods'><li data-type='method'><a href="RTMError.html#.networkError">networkError</a></li><li data-type='method'><a href="RTMError.html#.rateLimitError">rateLimitError</a></li><li data-type='method'><a href="RTMError.html#.referenceError">referenceError</a></li><li data-type='method'><a href="RTMError.html#.responseError">responseError</a></li><li data-type='method'><a href="RTMError.html#.serverError">serverError</a></li><li data-type='method'><a href="RTMError.html#toString">toString</a></li></ul></li><li><a href="RTMList.html">RTMList</a></li><li><a href="RTMResponse.html">RTMResponse</a><ul class='methods'><li data-type='method'><a href="RTMResponse.html#has">has</a></li><li data-type='method'><a href="RTMResponse.html#toString">toString</a></li></ul></li><li><a href="RTMSuccess.html">RTMSuccess</a><ul class='methods'><li data-type='method'><a href="RTMSuccess.html#toString">toString</a></li></ul></li><li><a href="RTMTask.html">RTMTask</a></li><li><a href="RTMUser.html">RTMUser</a><ul class='methods'><li data-type='method'><a href="RTMUser.html#clearTaskIndexCache">clearTaskIndexCache</a></li><li data-type='method'><a href="RTMUser.html#get">get</a></li><li data-type='method'><a href="RTMUser.html#verifyAuthToken">verifyAuthToken</a></li><li data-type='method'><a href="RTMUser.html#~lists/add">lists/add</a></li><li data-type='method'><a href="RTMUser.html#~lists/archive">lists/archive</a></li><li data-type='method'><a href="RTMUser.html#~lists/get">lists/get</a></li><li data-type='method'><a href="RTMUser.html#~lists/remove">lists/remove</a></li><li data-type='method'><a href="RTMUser.html#~lists/rename">lists/rename</a></li><li data-type='method'><a href="RTMUser.html#~tasks/add">tasks/add</a></li><li data-type='method'><a href="RTMUser.html#~tasks/addTags">tasks/addTags</a></li><li data-type='method'><a href="RTMUser.html#~tasks/complete">tasks/complete</a></li><li data-type='method'><a href="RTMUser.html#~tasks/decreasePriority">tasks/decreasePriority</a></li><li data-type='method'><a href="RTMUser.html#~tasks/get">tasks/get</a></li><li data-type='method'><a href="RTMUser.html#~tasks/getTask">tasks/getTask</a></li><li data-type='method'><a href="RTMUser.html#~tasks/increasePriority">tasks/increasePriority</a></li><li data-type='method'><a href="RTMUser.html#~tasks/move">tasks/move</a></li><li data-type='method'><a href="RTMUser.html#~tasks/postpone">tasks/postpone</a></li><li data-type='method'><a href="RTMUser.html#~tasks/priority">tasks/priority</a></li><li data-type='method'><a href="RTMUser.html#~tasks/remove">tasks/remove</a></li><li data-type='method'><a href="RTMUser.html#~tasks/removeTags">tasks/removeTags</a></li><li data-type='method'><a href="RTMUser.html#~tasks/setDueDate">tasks/setDueDate</a></li><li data-type='method'><a href="RTMUser.html#~tasks/setName">tasks/setName</a></li><li data-type='method'><a href="RTMUser.html#~tasks/setURL">tasks/setURL</a></li><li data-type='method'><a href="RTMUser.html#~tasks/uncomplete">tasks/uncomplete</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">RTMError</h1>
<section>
<header>
<h2>
RTMError
</h2>
<div class="class-description"><h3>RTM Error Response</h3><p>This Class represents a failed request to the RTM API Server: the
RTM API Server returned a response with a status of 'fail'. This
Class will include the error code and error message from the
response.</p>
<p><code>RTMError</code> extends <a href="RTMResponse.html">RTMResponse</a></p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="RTMError"><span class="type-signature"></span>new RTMError<span class="signature">(code, msg)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line18">line 18</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new RTM Error Response</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>code</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Error Code</p></td>
</tr>
<tr>
<td class="name"><code>msg</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Error Message</p></td>
</tr>
</tbody>
</table>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="code"><span class="type-signature"></span>code<span class="type-signature"> :number</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line36">line 36</a>
</li></ul></dd>
</dl>
<div class="description">
<p>The RTM Error Code</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<h4 class="name" id="msg"><span class="type-signature"></span>msg<span class="type-signature"> :string</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line44">line 44</a>
</li></ul></dd>
</dl>
<div class="description">
<p>The RTM Error Message</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".networkError"><span class="type-signature">(static) </span>networkError<span class="signature">()</span><span class="type-signature"> → {<a href="RTMError.html">RTMError</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line67">line 67</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new <code>RTMError</code> that represents a network error.</p>
<p>Error Code: <code>-1</code></p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="RTMError.html">RTMError</a></span>
</dd>
</dl>
<h4 class="name" id=".rateLimitError"><span class="type-signature">(static) </span>rateLimitError<span class="signature">()</span><span class="type-signature"> → {<a href="RTMError.html">RTMError</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line99">line 99</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new <code>RTMError</code> that represents an RTM API Rate Limit (the RTM API
returned a HTTP Status code of <code>503</code>).</p>
<p>Error Code: <code>-4</code></p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="RTMError.html">RTMError</a></span>
</dd>
</dl>
<h4 class="name" id=".referenceError"><span class="type-signature">(static) </span>referenceError<span class="signature">()</span><span class="type-signature"> → {<a href="RTMError.html">RTMError</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new <code>RTMError</code> that represents an index error (ie, task index is out
of range).</p>
<p>Error Code: <code>-3</code></p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="RTMError.html">RTMError</a></span>
</dd>
</dl>
<h4 class="name" id=".responseError"><span class="type-signature">(static) </span>responseError<span class="signature">()</span><span class="type-signature"> → {<a href="RTMError.html">RTMError</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line77">line 77</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new <code>RTMError</code> that represents an API response error.</p>
<p>Error Code: <code>-2</code></p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="RTMError.html">RTMError</a></span>
</dd>
</dl>
<h4 class="name" id=".serverError"><span class="type-signature">(static) </span>serverError<span class="signature">()</span><span class="type-signature"> → {<a href="RTMError.html">RTMError</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Create a new <code>RTMError</code> that represents an RTM API Server Error (the RTM API
returned a HTTP Status code of <code>5xx</code> - excluding <code>503</code>).</p>
<p>Error Code: <code>-5</code></p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="RTMError.html">RTMError</a></span>
</dd>
</dl>
<h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="response_error.js.html">response/error.js</a>, <a href="response_error.js.html#line52">line 52</a>
</li></ul></dd>
</dl>
<div class="description">
<p>Get a String representation of the Error</p>
</div>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Jan 09 2019 17:57:03 GMT-0500 (EST) using the <a href="https://github.com/dwaring87/docdash">@dwaring87/docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>