-- Markus Wolff <[EMAIL PROTECTED]> wrote
(on Thursday, 12 July 2007, 04:00 PM +0200):
> I have found my error: 
> 
> $posts = $feed->getUserPosts('mwolff');
> 
> ...is not enough, you *have* to specify the number of posts to retrieve
> as the second parameter:
> 
> $posts = $feed->getUserPosts('mwolff', 10);
> 
> That does the trick. It's a bit counter-intuitive to me, I would have
> expected it to return *all* posts if I specify null or 0 as the second
> parameter. Oh, well... thanks anyway :-)

Markus, please post this as an issue in the tracker. That certainly
seems non-intuitive, and it either needs to be a documentation issue
(for instance, if del.icio.us *requires* the post limit), given a
reasonable default (other than 0, again, if del.icio.us requires a
limit), or fixed to pull all posts if no second parameter is provided.


> Am Freitag, den 06.07.2007, 15:49 +0200 schrieb Markus Wolff:
> > Hey Darby,
> > 
> > unfortunately, it's zero. :-(
> > 
> > Here's a dump of the PostList object:
> > 
> > Zend_Service_Delicious_PostList Object
> > (
> >     [_posts:protected] => Array
> >         (
> >         )
> > 
> >     [_service:protected] => Zend_Service_Delicious Object
> >         (
> >             [_rest:protected] => Zend_Rest_Client Object
> >                 (
> >                     [_data:protected] => Array
> >                         (
> >                         )
> > 
> >                     [_uri:protected] => Zend_Uri_Http Object
> >                         (
> >                             [_username:protected] => 
> >                             [_password:protected] => 
> >                             [_host:protected] => del.icio.us
> >                             [_port:protected] => 80
> >                             [_path:protected] => /feeds/json/mwolff/
> >                             [_query:protected] => 
> >                             [_fragment:protected] => 
> >                             [_regex:protected] => Array
> >                                 (
> >                                     [alphanum] => [^\W_]
> >                                     [escaped] => (?:%[\da-fA-F]{2})
> >                                     [mark] => [-_.!~*'()\[\]]
> >                                     [reserved] => [;\/?:@&=+$,]
> >                                     [unreserved] => 
> > (?:[^\W_]|[-_.!~*'()\[\]])
> >                                     [segment] => 
> > (?:(?:(?:[^\W_]|[-_.!~*'()\[\]])|(?:%[\da-fA-F]{2})|[:@&=+$,;])*)
> >                                     [path] => 
> > (?:\/(?:(?:(?:[^\W_]|[-_.!~*'()\[\]])|(?:%[\da-fA-F]{2})|[:@&=+$,;])*)?)+
> >                                     [uric] => 
> > (?:[;\/?:@&=+$,]|(?:[^\W_]|[-_.!~*'()\[\]])|(?:%[\da-fA-F]{2}))
> >                                 )
> > 
> >                             [_scheme:protected] => http
> >                         )
> > 
> >                 )
> > 
> >             [_authUname:protected] => 
> >             [_authPass:protected] => 
> >         )
> > 
> >     [_iteratorKey:protected] => 0
> > )
> > 
> > As you can see, it tries to fetch http://del.icio.us/feeds/json/mwolff/, 
> > which
> > is not only correct, but also contains a number of posts.
> > 
> > Bug?
> > 
> > CU
> >  Markus
> > 
> > Am Freitag, den 06.07.2007, 09:21 -0400 schrieb Darby Felton:
> > > Hi Markus,
> > > 
> > > It appears that your usage is correct... what is the result of
> > > count($posts)?
> > > 
> > > Best regards,
> > > Darby
> > > 
> > > Markus Wolff wrote:
> > > > Hey guys,
> > > > 
> > > > I'm currently trying to figure out Zend_Service_Delicious. I really
> > > > don't want to do anything complicated, just fetch a user's public posts.
> > > > According to the manual, this should work nicely:
> > > > 
> > > > $feed = new Zend_Service_Delicious();
> > > > $posts = $feed->getUserPosts('mwolff');
> > > > foreach($posts as $item) {
> > > >     echo "<pre>"; print_r($item); echo "\n</pre>";
> > > > }
> > > > 
> > > > After the call to getUserPosts(), $posts does contain a
> > > > Zend_Service_Delicious_PostList object. The following iteration,
> > > > however, yields no results whatsoever.
> > > > 
> > > > This is with a checkout of trunk from Monday. What am I doing wrong? Am
> > > > I doing anything wrong??
> > > > 
> > > > Thanks,
> > > >   Markus
> > > > 
> > > > 
> > 
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to