UNPKG

rtm-api

Version:

Remember the Milk API Interface

2,788 lines (787 loc) 39.9 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>RTMClient - 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">RTMClient</h1> <section> <header> <h2> RTMClient </h2> <div class="class-description"><h3>RTM API Client</h3><p>This Class is used to represent an RTM API Client. The Client contains the API Key, API Secret and access permissions used to access the RTM API endpoints.</p> <p>It also includes API wrapper functions for making a general RTM API request as well as the auth-related functions.</p> <h4>Usage</h4><p>The <code>RTMClient</code> Class is what is exported when the entire <code>rtm-api</code> module is loaded via <code>require</code>.</p> <pre class="prettyprint source"><code>const RTM = require('rtm-api'); let client = new RTM(API_KEY, API_SECRET, RTM.PERM_DELETE);</code></pre><h4>Auth Example</h4><p>This example gets an Auth URL to be opened by the RTM User</p> <pre class="prettyprint source"><code>client.auth.getAuthUrl(function(err, authUrl, frob) { // Have user authenticate and authorize the program with the authUrl // Once authorized by the user, use the frob to get an authToken )};</code></pre><h4>RTM API Example</h4><p>This example makes an RTM API request using the method <code>rtm.method</code> and the parameter foo=bar.</p> <pre class="prettyprint source"><code>client.get('rtm.method', {foo: &quot;bar&quot;}, function(err, resp) { if ( err ) { // handle error } // use the response });</code></pre><p>See <a href="RTMUser.html#get">RTMUser.get</a> for making User-authenticated API requests.</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="RTMClient"><span class="type-signature"></span>new RTMClient<span class="signature">(key, secret, perms<span class="signature-attributes">opt</span>)</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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line53">line 53</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new RTM Client with the specified API access information</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>RTM API Client Key</p></td> </tr> <tr> <td class="name"><code>secret</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>RTM API Client Secret</p></td> </tr> <tr> <td class="name"><code>perms</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>RTMClient.PERM_READ</code> </td> <td class="description last"><p>RTM API Client Access Permissions. This should be one of <a href="RTMClient.html#.PERM_READ">RTMClient.PERM_READ</a>, <a href="RTMClient.html#.PERM_WRITE">RTMClient.PERM_WRITE</a> or <a href="RTMClient.html#.PERM_DELETE">RTMClient.PERM_DELETE</a>.</p></td> </tr> </tbody> </table> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id=".PERM_DELETE"><span class="type-signature">(static) </span>PERM_DELETE<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line178">line 178</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>delete</li> </ul></dd> </dl> <div class="description"> <p>RTM API Access: <code>delete</code> - gives the ability to delete task, contacts, groups and list (also allows you to <code>read</code> and <code>write</code>).</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERM_READ"><span class="type-signature">(static) </span>PERM_READ<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line160">line 160</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>read</li> </ul></dd> </dl> <div class="description"> <p>RTM API Access: <code>read</code> - gives the ability to read task, contact, group and list details and contents.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id=".PERM_WRITE"><span class="type-signature">(static) </span>PERM_WRITE<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line169">line 169</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>write</li> </ul></dd> </dl> <div class="description"> <p>RTM API Access: <code>write</code> - gives the ability to add and modify task, contact, group and list details and contents (also allows you to <code>read</code>).</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="auth"><span class="type-signature"></span>auth<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line144">line 144</a> </li></ul></dd> </dl> <div class="description"> <p>Auth-related functions:</p> <ul> <li><a href="RTMClient.html#~auth/getAuthUrl">getAuthUrl</a></li> <li><a href="RTMClient.html#~auth/getAuthToken">getAuthToken</a></li> <li><a href="RTMClient.html#~auth/verifyAuthToken">verifyAuthToken</a></li> </ul> </div> <h4 class="name" id="key"><span class="type-signature"></span>key<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line75">line 75</a> </li></ul></dd> </dl> <div class="description"> <p>RTM API Client Key</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="perms"><span class="type-signature"></span>perms<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line91">line 91</a> </li></ul></dd> </dl> <div class="description"> <p>RTM API Client Access Permissions</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="secret"><span class="type-signature"></span>secret<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line83">line 83</a> </li></ul></dd> </dl> <div class="description"> <p>RTM API Client Secret</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="user"><span class="type-signature"></span>user<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line108">line 108</a> </li></ul></dd> </dl> <div class="description"> <p>User export/import-related functions:</p> <ul> <li><a href="RTMClient.html#~user/create">create</a></li> <li><a href="RTMClient.html#~user/export">export</a></li> <li><a href="RTMClient.html#~user/exportToString">exportToString</a></li> <li><a href="RTMClient.html#~user/import">import</a></li> <li><a href="RTMClient.html#~user/importFromString">importFromString</a></li> </ul> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(method, params<span class="signature-attributes">opt</span>, user<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="client_index.js.html">client/index.js</a>, <a href="client_index.js.html#line133">line 133</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>RTM API methods that require an AuthToken should set the <code>params</code> <code>auth_token</code> property or provide a valid <code>RTMUser</code> with an AuthToken.</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 Method Parameters (as an object with key/value pairs)</p></td> </tr> <tr> <td class="name"><code>user</code></td> <td class="type"> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>The RTM User making the request</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="~auth/getAuthToken"><span class="type-signature">(inner) </span>auth/getAuthToken<span class="signature">(frob, 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="client_auth.js.html">client/auth.js</a>, <a href="client_auth.js.html#line31">line 31</a> </li></ul></dd> </dl> <div class="description"> <p>Get an Auth Token.</p> <p>This function takes the frob that was generated by <code>getAuthUrl()</code> and requests an Auth Token. The callback function will return an <code>RTMUser</code> which will include the RTM User's information and an Auth Token to be used in future API calls.</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>frob</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Auth Frob from <code>getAuthUrl()</code></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, user)</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>user</code></td> <td class="type"> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </td> <td class="description last"><p>RTM User, with user information and auth token</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~auth/getAuthUrl"><span class="type-signature">(inner) </span>auth/getAuthUrl<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="client_auth.js.html">client/auth.js</a>, <a href="client_auth.js.html#line15">line 15</a> </li></ul></dd> </dl> <div class="description"> <p>Get an Auth URL.</p> <p>This function will generate an Auth URL that will be given to the RTM User to authorize the RTM Client to access their account. It will also request a frob that will be used to gain an auth token in <code>getAuthToken()</code>.</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, authUrl, frob)</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>authUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Auth URL to be given to User</p></td> </tr> <tr> <td class="name"><code>frob</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Auth Frob to be used in <code>getAuthToken()</code></p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="~auth/verifyAuthToken"><span class="type-signature">(inner) </span>auth/verifyAuthToken<span class="signature">(token, 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="client_auth.js.html">client/auth.js</a>, <a href="client_auth.js.html#line48">line 48</a> </li></ul></dd> </dl> <div class="description"> <p>Verify Auth Token.</p> <p>This function will check if the User's Auth Token is still valid and can be used to make authenticated RTM API requests.</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>token</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </td> <td class="description last"><p>Auth Token or RTMUser containing an auth token</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, 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="~user/create"><span class="type-signature">(inner) </span>user/create<span class="signature">(id, username, fullname, authToken)</span><span class="type-signature"> &rarr; {<a href="RTMUser.html">RTMUser</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="client_user.js.html">client/user.js</a>, <a href="client_user.js.html#line15">line 15</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new <code>RTMUser</code> manually.</p> <p>This will also set the User's RTM API Client to this <code>RTMClient</code>.</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> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </dd> </dl> <h4 class="name" id="~user/export"><span class="type-signature">(inner) </span>user/export<span class="signature">(user)</span><span class="type-signature"> &rarr; {object}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="client_user.js.html">client/user.js</a>, <a href="client_user.js.html#line32">line 32</a> </li></ul></dd> </dl> <div class="description"> <p>Get the User's required information:</p> <ul> <li>id</li> <li>username</li> <li>fullname</li> <li>authToken</li> <li>client (if set or use this <code>RTMClient</code>)</li> </ul> </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>user</code></td> <td class="type"> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </td> <td class="description last"><p>The RTMUser to export</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> <h4 class="name" id="~user/exportToString"><span class="type-signature">(inner) </span>user/exportToString<span class="signature">(user)</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="client_user.js.html">client/user.js</a>, <a href="client_user.js.html#line69">line 69</a> </li></ul></dd> </dl> <div class="description"> <p>Get the User's required information as a JSON-string</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>user</code></td> <td class="type"> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </td> <td class="description last"><p>The RTMUser to export</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id="~user/import"><span class="type-signature">(inner) </span>user/import<span class="signature">(properties)</span><span class="type-signature"> &rarr; {<a href="RTMUser.html">RTMUser</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="client_user.js.html">client/user.js</a>, <a href="client_user.js.html#line79">line 79</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new <code>RTMUser</code> from an exported User's properties</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>properties</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The RTM User's required properties</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="RTMUser.html">RTMUser</a></span> </dd> </dl> <h4 class="name" id="~user/importFromString"><span class="type-signature">(inner) </span>user/importFromString<span class="signature">(string)</span><span class="type-signature"> &rarr; {<a href="RTMUser.html">RTMUser</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="client_user.js.html">client/user.js</a>, <a href="client_user.js.html#line101">line 101</a> </li></ul></dd> </dl> <div class="description"> <p>Create a new <code>RTMUser</code> from an exported User's properties' JSON-string</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>string</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>JSON-string of RTM User's required properties</p></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="RTMUser.html">RTMUser</a></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>