UNPKG

rtm-api

Version:

Remember the Milk API Interface

867 lines (227 loc) 13.8 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>RTMResponse - 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">RTMResponse</h1> <section> <header> <h2> RTMResponse </h2> <div class="class-description"><h3>RTM Generic Response</h3><p>This Class represents a generic Response from the RTM API Server. The <code>RTMError</code> and <code>RTMSuccess</code> Classes represent the actual failed and successful responses from the RTM API Server.</p> <p>This Class is extended by the <a href="RTMSuccess.html">RTMSuccess</a> and <a href="RTMError.html">RTMError</a> Classes.</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="RTMResponse"><span class="type-signature"></span>new RTMResponse<span class="signature">(status)</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_response.js.html">response/response.js</a>, <a href="response_response.js.html#line14">line 14</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new Generic RTM Response with a status of either <a href="RTMResponse.html#.STATUS_OK">RTMResponse.STATUS_OK</a> or <a href="RTMResponse.html#.STATUS_FAIL">RTMResponse.STATUS_FAIL</a>.</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>status</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>RTM API Status</p></td> </tr> </tbody> </table> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id=".STATUS_FAIL"><span class="type-signature">(static) </span>STATUS_FAIL<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_response.js.html">response/response.js</a>, <a href="response_response.js.html#line98">line 98</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>fail</li> </ul></dd> </dl> <div class="description"> <p>RTM Status of 'fail' = error</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".STATUS_OK"><span class="type-signature">(static) </span>STATUS_OK<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_response.js.html">response/response.js</a>, <a href="response_response.js.html#line91">line 91</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>ok</li> </ul></dd> </dl> <div class="description"> <p>RTM Status of 'ok' = successful</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="isOk"><span class="type-signature"></span>isOk<span class="type-signature"> :boolean</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="response_response.js.html">response/response.js</a>, <a href="response_response.js.html#line38">line 38</a> </li></ul></dd> </dl> <div class="description"> <p>The success of the RTM Response (ie, is <code>true</code> when status is 'ok')</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <h4 class="name" id="props"><span class="type-signature"></span>props<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="response_response.js.html">response/response.js</a>, <a href="response_response.js.html#line46">line 46</a> </li></ul></dd> </dl> <div class="description"> <p>The RTM API properties of the Response</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="status"><span class="type-signature"></span>status<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_response.js.html">response/response.js</a>, <a href="response_response.js.html#line30">line 30</a> </li></ul></dd> </dl> <div class="description"> <p>The RTM Response Status</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="has"><span class="type-signature"></span>has<span class="signature">(property)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="response_response.js.html">response/response.js</a>, <a href="response_response.js.html#line61">line 61</a> </li></ul></dd> </dl> <div class="description"> <p>Check if the Response has the specified property</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>property</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Property Name</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="response_response.js.html">response/response.js</a>, <a href="response_response.js.html#line79">line 79</a> </li></ul></dd> </dl> <div class="description"> <p>Get a String representation of the Response</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>