The userTimeline() arguments is out of sync with the API, (id, count, since,
since_id, page) versus (id, user_id,
screen_name, since_id, max_id, count, page) in the API.
Admittedly, the lack of screen_name and user_id could be put aside as
implementation details, but the use of $since is
wrong, and the inclusion of $max_id completes an up to date implementation.
Very quickly (the syntax needs testing but is close to the mark)...
function userTimeline($id=false, $user_id=false, $screen_name = false, $since_id=false, $max_id = false, $count=20, $page=false)
{
if( !in_array( $this->type, array( 'xml','json','rss','atom' ) ) )
return false;
$args = array();
if( $user_id )
$args['user_id'] = $user_id;
if( $screen_name )
$args['screen_name'] = $screen_name;
if( $since_id )
$args['since_id'] = (int) $since_id;
if( $max_id )
$args['max_id'] = (int) $max_id;
if( $count )
$args['count'] = (int) $count;
if( $page )
$args['page'] = (int) $page;
$qs = '';
if( !empty( $args ) )
$qs = $this->_glue( $args );
if( $id === false )
$request = 'http://twitter.com/statuses/user_timeline.' . $this->type . $qs;
else
$request = 'http://twitter.com/statuses/user_timeline/' . rawurlencode($id) . '.' . $this->type . $qs;
return $this->objectify( $this->process($request) );
}
Original issue reported on code.google.com by three.e...@gmail.com on 21 May 2009 at 1:29
Original issue reported on code.google.com by
three.e...@gmail.com
on 21 May 2009 at 1:29