-
Notifications
You must be signed in to change notification settings - Fork 0
Actions Application: Items
NateFerrero edited this page Sep 22, 2011
·
1 revision
Code:
e.app.actions.items( function(err, items) {
items.forEach( function(item) {
// Do something with each action item here
} );
} );
Returned Values for variable items
:
Variable | Contents | Description |
---|---|---|
items.items | [Item, Item, ...] | Array of action items, up to the amount per page (default 10). |
items._next | Function | Call this to load the next page of action items automatically. |
items._prev | Function | Call this to load the previous page of action items automatically. |
items._page(page) | Function | Call this to load a specific page of action items automatically. |
items.count | 10 | The number of action items on the current page. |
items.paging | Object
|
Paging information
|
Code:
e.app.actions.item(43, function(err, item) {
// Do something with the action item here
} );
Get an individual item like that, or using the list as previously demonstrated.
Returned Values for variable item
:
Variable | Contents | Description |
---|---|---|
item.id | 43 | ID of the action item. |
item.description | Watch the introduction video. | Short description of the action item. |
item.message | Learn more about living 58 | Message displayed when completing the action. |
item.type | link | Type of the action item. |
item.url | /momentum/intro | URL of the action item. |
item.points | 10 | How many points the action item is worth. |
item.ticks | 5 | Action item tick (number of completions) count. |
item.completed | false | True only if a user is logged in and has completed the action item. |