Skip to content
johanv edited this page Sep 17, 2012 · 2 revisions

With 'statuses', I mean tweets or dents.

Representation

Tweets or dents are represented by a json object, as in this example tweet.

Presentation

The tweets are shown in the UI in 'tweetview' divs. These tweetviews contain lists, where the tweets are list items. The template for such a tweet can be found in data/js/ui.template.js. See home tweetview for an example of such a list with tweets.

Fetching

lib.twitter.js contains methods self.get_*, e.g. self.get_home_timeline, self.get_mentions,... which fetch the statuses to be shown on particular views. All these methods call self.get (see https://github.com/shellex/Hotot/blob/master/data/js/lib.twitter.js#L105) with an appropriate API request.

Statuses are added to a view by calling load_tweet_success (see https://github.com/shellex/Hotot/blob/master/data/js/ui.main.js#L168).

Rendering

Rendering of status messages is done by form_tweet (in ui.template.js), which in turn calls form_text for rendering the actual tweet or dent.

Clone this wiki locally