Constructor
new RTMUser(id, username, fullname, authToken)
- Source:
Create a new RTM User.
An RTMUser
can be used to make user-authenticated RTM API calls and also
includes wrapper methods around some common RTM API methods.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The RTM User's ID |
username |
string | The RTM User's username |
fullname |
string | The RTM User's full name |
authToken |
string | The RTM User's Auth Token |
Members
authToken :string
- Source:
RTM User Auth Token
Type:
- string
client :RTMClient
- Source:
The RTMClient that authorized this User
Type:
fullname :string
- Source:
RTM User fullname
Type:
- string
id :number
- Source:
RTM User ID
Type:
- number
lists
- Source:
tasks
- Source:
timeline :number
- Source:
The RTM Timeline for this User
Type:
- number
username :string
- Source:
RTM User Username
Type:
- string
Methods
get(method, paramsopt, callback)
- Source:
Make the specified RTM API call.
The method
should be the name of the RTM API method. Any necessary
parameters should be provided with params
as an object with the properties
of the object as the parameters' key/value pairs.
This function will automatically add the User's auth token to the request.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
method |
string | RTM API Method |
||||||||||
params |
object |
<optional> |
RTM API Method Parameters |
|||||||||
callback |
function | Callback function(err, resp) Properties
|
verifyAuthToken(callback)
- Source:
Verify the Auth Token of this RTM User
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | Callback function(err, verified) Properties
|
(inner) lists/add(name, callback)
- Source:
Add a new RTM List for this User
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
name |
string | Name of the new RTM List |
||||||
callback |
function | Callback function(err, lists) Properties
|
(inner) lists/get(callback)
- Source:
Get the list of RTM Lists for this User from the API Server
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | Callback function(err, lists) Properties
|
(inner) lists/remove(name, callback)
- Source:
Remove the specified RTM List for this User
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
name |
string | RTM List Name |
||||||
callback |
function | Callback function(err) Properties
|
(inner) lists/rename(oldName, newName, callback)
- Source:
Rename the specified RTM List for this User
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
oldName |
string | Old RTM List Name |
||||||
newName |
string | New RTM List name |
||||||
callback |
function | Callback function(err) Properties
|
(inner) tasks/add(name, propsopt, callback)
- Source:
Add a new RTM Task for this User
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string | Task Name (can include 'Smart Add' syntax) |
|||||||||||||||||||||||||||||||||||||
props |
object |
<optional> |
Task Properties Properties
|
||||||||||||||||||||||||||||||||||||
callback |
function | Callback function(err) Properties
|
(inner) tasks/get(filteropt, callback)
- Source:
Get the list of RTM Tasks for this User.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
filter |
string |
<optional> |
Tasks Filter (RTM Advanced Search Syntax) |
|||||||||
callback |
function | Callback function(err, tasks) Properties
|