Objects are just the parts of the stream item. Objects are not the actual content. Check on the functions section to see how to set or get the content of an item.
- This is the author part of the item.
- The avatar of the author.
- This is the content area of the item. It will often contain HTML and not just plain text.
- The colored (usually transparent) border around a stream item.
- This is the blue footer below the stream item. It is hidden by default for most services.
Variables are similar to Objects, except that they just return pure data and don't have other aspects.
- Returns the associated account name of the stream item. For instance. If you Twitter name is "bob123" and the stream item was loaded in from your bob123 account, item.account would return "bob123".
- Returns all of the raw API response data for the stream item. This will differ for every service. In order to interact with this data, you will need to familiarize yourself with that service's API documentation.
- Returns an array of duplicate stream items associated with the current stream item, if any. Each item in the array has its own properties.
- Returns a string of an approximate time the item was posted. Ex: "about 10 minutes ago"
- Returns an array of all the photos associated with the post. Usually only has a length of 0 or 1, but some Twitter posts have more than one photo.
- Returns the name of the service (lowercase) for the stream item. ("foursquare","facebook","twitter","flickr",etc)
- Makes the object visible. Useful for things like the footer that is hidden by default.
- Makes the object hidden.
- Returns the content of the object. May contain HTML or plain text.
- Sets the content of the object
- Sets the CSS of the object. Accepts a string of CSS in the format of "property: value; secondProperty: newValue;"
Here are some code examples.
To make any stream item with duplicates have red text:
To display the app a user used to send a tweet and the time they sent it:
item.footer.setContent(item.fuzzyDate+" via "+item.data.source);
To make a user's avatar smaller and titled:
item.avatar.addStyles("width: 32px; -webkit-tramsform: rotate(-10deg);");