davidbauer/Instacurate — pull request #92 by dergraf (2013-10-09 12:47:18+00:00)
Title: factored out a Timeline and a Tweet class

API (working):
new TimeLine(); will figure out if a Twitter user is logged in and show its timeline, if no user is logged in nothing happens
new TimeLine('@username'); will show the timeline of another Twitter user

API (not working):
new TimeLine('query'); should create a Timeline given a query
new TimeLine('list:...') should create a Timeline taking links of a twitter list of the logged in user

Tweaking the TimeLine
var tl = new TimeLine();
tl.tweetsToFetch = 200; // nr of tweets it should load in the buffer
tl.minNrOfLinks = 12; // nr of links it should present in one cycle (initial load, scroll, auto-refresh)
tl.twitterMaxSearchApiRequests = 10; // rate limit of nr of twitter api requests for this timeline
tl.autoRefresh = true; // autoRefresh
tl.autoRefreshInterval = 60000; // refresh interval in milis

open TODOs:
- auto refreshing is currently wrongly implemented. it is just taking more items from the buffer, which is wrong, it should check the Twitter API for new tweets including new links. Moreover it won't give the user any feedback that it is refreshing (which the current master does)
- implement the API (not working) todos, may need some changes on the app server
- reimplement search
- reimplement url-hash
- reimplement warning-messages
- the rendering-logic for the links can/should be further encapsulated.
- further improve OOP, this is just a first attempt