UNPKG

rtm-api

Version:

Remember the Milk API Interface

3,657 lines (1,001 loc) 83.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>RTMUser - 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">RTMUser</h1> <section> <header> <h2> RTMUser </h2> <div class="class-description"><h3>RTM User</h3><p>This Class is used to represent an authorized RTM User. An <code>RTMUser</code> instance contains the user's ID, username and fullname as well as an auth token that can be used to make user-authenticated API requests.</p> <h4>Usage</h4><p>An <code>RTMUser</code> instance can created manually with an <a href="RTMClient.html">RTMClient</a>:</p> <pre class="prettyprint source"><code>let user = client.user.create(1234, 'username', 'full name', 'auth_token');</code></pre><p>or can be returned through the RTM API auth process (specifically the callback function from <a href="RTMClient.html#~auth/getAuthToken">RTMClient.auth.getAuthToken()</a>).</p> <pre class="prettyprint source"><code>// Get an Auth URL client.auth.getAuthUrl(function(err, authUrl, frob) { // Have the User open this URL in their browser console.log(authUrl); // Get an authenticated RTMUser client.auth.getAuthToken(frob, function(err, user) { // user is an instance of RTMUser }); });</code></pre><h4>API Wrappers</h4><p>The <code>RTMUser</code> also includes a number of wrapper functions for commonly used RTM API methods dealing with Lists and Tasks.</p> <p><strong>Tasks:</strong></p> <p>For example, to get the User's RTM Tasks:</p> <pre class="prettyprint source"><code>user.tasks.get(function(err, tasks) { console.log(tasks); });</code></pre><p>The <code>tasks.get()</code> function will also fetch the User's RTM Lists and add the List (as an <code>RTMList</code> instance) that contains the Task to the <code>list</code> property of the <code>RTMTask</code>.</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="RTMUser"><span class="type-signature"></span>new RTMUser<span class="signature">(id, username, fullname, authToken)</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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line61">line 61</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new RTM User.</p> <p>An <code>RTMUser</code> can be used to make user-authenticated RTM API calls and also includes wrapper methods around some common RTM API methods.</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>id</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The RTM User's ID</p></td> </tr> <tr> <td class="name"><code>username</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The RTM User's username</p></td> </tr> <tr> <td class="name"><code>fullname</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The RTM User's full name</p></td> </tr> <tr> <td class="name"><code>authToken</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The RTM User's Auth Token</p></td> </tr> </tbody> </table> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="authToken"><span class="type-signature"></span>authToken<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line117">line 117</a> </li></ul></dd> </dl> <div class="description"> <p>RTM User Auth Token</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="client"><span class="type-signature"></span>client<span class="type-signature"> :<a href="RTMClient.html">RTMClient</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line134">line 134</a> </li></ul></dd> </dl> <div class="description"> <p>The <a href="RTMClient.html">RTMClient</a> that authorized this User</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="RTMClient.html">RTMClient</a></span> </li> </ul> <h4 class="name" id="fullname"><span class="type-signature"></span>fullname<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line109">line 109</a> </li></ul></dd> </dl> <div class="description"> <p>RTM User fullname</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="id"><span class="type-signature"></span>id<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line93">line 93</a> </li></ul></dd> </dl> <div class="description"> <p>RTM User ID</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="lists"><span class="type-signature"></span>lists<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line257">line 257</a> </li></ul></dd> </dl> <div class="description"> <p>RTM List related functions:</p> <ul> <li><a href="RTMUser.html#~lists/get">get</a></li> <li><a href="RTMUser.html#~lists/add">add</a></li> <li><a href="RTMUser.html#~lists/rename">rename</a></li> <li><a href="RTMUser.html#~lists/remove">remove</a></li> </ul> </div> <h4 class="name" id="requestTimeout"><span class="type-signature"></span>requestTimeout<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line177">line 177</a> </li></ul></dd> </dl> <div class="description"> <p>Time (ms) to wait to make an API Request</p> </div> <h4 class="name" id="tasks"><span class="type-signature"></span>tasks<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line280">line 280</a> </li></ul></dd> </dl> <div class="description"> <p>RTM Task related functions:</p> <ul> <li><a href="RTMUser.html#~tasks/get">get</a></li> <li><a href="RTMUser.html#~tasks/add">add</a></li> <li><a href="RTMUser.html#~tasks/remove">remove</a></li> <li><a href="RTMUser.html#~tasks/complete">complete</a></li> <li><a href="RTMUser.html#~tasks/uncomplete">uncomplete</a></li> <li><a href="RTMUser.html#~tasks/addTags">addTags</a></li> <li><a href="RTMUser.html#~tasks/removeTags">removeTags</a></li> <li><a href="RTMUser.html#~tasks/priority">priority</a></li> <li><a href="RTMUser.html#~tasks/decreasePriority">decreasePriority</a></li> <li><a href="RTMUser.html#~tasks/increasePriority">increasePriority</a></li> <li><a href="RTMUser.html#~tasks/move">move</a></li> <li><a href="RTMUser.html#~tasks/setDueDate">setDueDate</a></li> <li><a href="RTMUser.html#~tasks/postpone">postpone</a></li> <li><a href="RTMUser.html#~tasks/setName">setName</a></li> </ul> </div> <h4 class="name" id="timeline"><span class="type-signature"></span>timeline<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line154">line 154</a> </li></ul></dd> </dl> <div class="description"> <p>The RTM Timeline for this User</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h4 class="name" id="username"><span class="type-signature"></span>username<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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line101">line 101</a> </li></ul></dd> </dl> <div class="description"> <p>RTM User Username</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="clearTaskIndexCache"><span class="type-signature"></span>clearTaskIndexCache<span class="signature">()</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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line244">line 244</a> </li></ul></dd> </dl> <div class="description"> <p>Clear the Task Index Cache for this RTM User</p> </div> <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(method, params<span class="signature-attributes">opt</span>, callback)</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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line226">line 226</a> </li></ul></dd> </dl> <div class="description"> <p>Make the specified RTM API call.</p> <p>The <code>method</code> should be the name of the RTM API method. Any necessary parameters should be provided with <code>params</code> as an object with the properties of the object as the parameters' key/value pairs.</p> <p>This function will automatically add the User's auth token to the request.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>method</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>RTM API Method</p></td> </tr> <tr> <td class="name"><code>params</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>RTM API Method Parameters</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last"><p>Callback function(err, resp)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM Error Response, if encountered</p></td> </tr> <tr> <td class="name"><code>resp</code></td> <td class="type"> <span class="param-type"><a href="RTMSuccess.html">RTMSuccess</a></span> </td> <td class="description last"><p>The parsed RTM API Response, if successful</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="verifyAuthToken"><span class="type-signature"></span>verifyAuthToken<span class="signature">(callback)</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="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line237">line 237</a> </li></ul></dd> </dl> <div class="description"> <p>Verify the Auth Token of this RTM User</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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err, verified)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM Error, if encountered (excluding a <code>Login failed / Invalid auth token</code> error)</p></td> </tr> <tr> <td class="name"><code>verified</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"><p><code>true</code> if the User's auth token was successfully verified or <code>false</code> if a <code>Login failed / Invalid auth token</code> error was encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~lists/add"><span class="type-signature">(inner) </span>lists/add<span class="signature">(name, filter<span class="signature-attributes">opt</span>, callback)</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="user_lists.js.html">user/lists.js</a>, <a href="user_lists.js.html#line27">line 27</a> </li></ul></dd> </dl> <div class="description"> <p>Add a new RTM List for this User</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>Name of the new RTM List</p></td> </tr> <tr> <td class="name"><code>filter</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Smart List Filter</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last"><p>Callback function(err, lists)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~lists/archive"><span class="type-signature">(inner) </span>lists/archive<span class="signature">(name, callback)</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="user_lists.js.html">user/lists.js</a>, <a href="user_lists.js.html#line114">line 114</a> </li></ul></dd> </dl> <div class="description"> <p>Archive the specified RTM List for this User</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>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>RTM List Name</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~lists/get"><span class="type-signature">(inner) </span>lists/get<span class="signature">(callback)</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="user_lists.js.html">user/lists.js</a>, <a href="user_lists.js.html#line16">line 16</a> </li></ul></dd> </dl> <div class="description"> <p>Get the list of RTM Lists for this User from the API Server</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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err, lists)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> <tr> <td class="name"><code>lists</code></td> <td class="type"> <span class="param-type">Array.&lt;<a href="RTMList.html">RTMList</a>></span> </td> <td class="description last"><p>List of User's RTM Lists</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~lists/remove"><span class="type-signature">(inner) </span>lists/remove<span class="signature">(name, callback)</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="user_lists.js.html">user/lists.js</a>, <a href="user_lists.js.html#line43">line 43</a> </li></ul></dd> </dl> <div class="description"> <p>Remove the specified RTM List for this User</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>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>RTM List Name</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~lists/rename"><span class="type-signature">(inner) </span>lists/rename<span class="signature">(oldName, newName, callback)</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="user_lists.js.html">user/lists.js</a>, <a href="user_lists.js.html#line78">line 78</a> </li></ul></dd> </dl> <div class="description"> <p>Rename the specified RTM List for this User</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>oldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Old RTM List Name</p></td> </tr> <tr> <td class="name"><code>newName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>New RTM List name</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~tasks/add"><span class="type-signature">(inner) </span>tasks/add<span class="signature">(name, props<span class="signature-attributes">opt</span>, callback)</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="user_tasks.js.html">user/tasks.js</a>, <a href="user_tasks.js.html#line127">line 127</a> </li></ul></dd> </dl> <div class="description"> <p>Add a new RTM Task for this User</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"><p>Task Name (can include 'Smart Add' syntax)</p></td> </tr> <tr> <td class="name"><code>props</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Task Properties</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>due</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Due Date (RTM supported date format)</p></td> </tr> <tr> <td class="name"><code>priority</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last"><p>Task Priority (1, 2, 3)</p></td> </tr> <tr> <td class="name"><code>list</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task List Name</p></td> </tr> <tr> <td class="name"><code>tags</code></td> <td class="type"> <span class="param-type">Array.&lt;string></span> </td> <td class="description last"><p>Task Tags</p></td> </tr> <tr> <td class="name"><code>location</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Location Name</p></td> </tr> <tr> <td class="name"><code>start</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Start Date (RTM supported date format)</p></td> </tr> <tr> <td class="name"><code>repeat</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Repeat Format (RTM supported repeat format)</p></td> </tr> <tr> <td class="name"><code>estimate</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Time Estimate (RTM supported time estimate format)</p></td> </tr> <tr> <td class="name"><code>to</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Contact Name to give Task to (existing contact or email address)</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Reference URL</p></td> </tr> <tr> <td class="name"><code>note</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Task Note</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~tasks/addTags"><span class="type-signature">(inner) </span>tasks/addTags<span class="signature">(index, tags, callback)</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="user_tasks.js.html">user/tasks.js</a>, <a href="user_tasks.js.html#line240">line 240</a> </li></ul></dd> </dl> <div class="description"> <p>Add the specified tag(s) to the Task</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>index</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last"><p>Task Index</p></td> </tr> <tr> <td class="name"><code>tags</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">Array.&lt;string></span> </td> <td class="description last"><p>Tag(s) to add to task</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~tasks/complete"><span class="type-signature">(inner) </span>tasks/complete<span class="signature">(index, callback)</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="user_tasks.js.html">user/tasks.js</a>, <a href="user_tasks.js.html#line154">line 154</a> </li></ul></dd> </dl> <div class="description"> <p>Mark the specified Task as complete</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>index</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last"><p>Task Index</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function(err)</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="RTMError.html">RTMError</a></span> </td> <td class="description last"><p>RTM API Error Response, if encountered</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~tasks/decreasePriority"><span class="type-signature">(inner) </span>tasks/decreasePriority<span class="signature">(index, callback)</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="user_tasks.js.html">user/tasks.js</a>, <a href="user_tasks.js.html#line332">line 332</a> </li></ul></dd> </dl> <div clas