PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » Services_Delicious » Bug #5173

getRecentPosts fails

Details

Submitted2005-08-22 03:23 UTC
Fromluke at fsc dot org dot au
Assignedschst
StatusClosed
PackageServices_Delicious
PHP Version4.3.10
OSdebian linux
Roadmaps(Not assigned)

Comments

[2005-08-22 03:23 UTC] luke at fsc dot org dot au

Description:
------------
calling the getRecentPosts function returns zero results due to incorrect statement in Services/Delicious.php
Fix:-
replace line #225 in Services/Delicious.php :
$result = $this->_sendRequest('posts', 'get', $params);

Change as follows:
$result = $this->_sendRequest('posts', 'recent', $params);

Test script:
---------------
<?php
require_once 'config.php';
require_once 'Services/Delicious.php';

$dlc = &new Services_Delicious($username, $password);

$posts = $dlc->getRecentPosts();
echo '<pre>';
print_r($posts);
echo '</pre>';

?>

Expected result:
----------------
should return 15 most recent entries from del.icio.us web site for $username; eg.
Array
(
[0] => Array
(
[href] => http://mrtwig.net/board/viewtopic.php?t=899
[description] => South Park
[hash] => f147b7c5fbc7c8c25963bacca0b631f8
[tag] => Array
(
[0] => film
[1] => tv
)

[time] => 2005-08-20T13:24:16Z
)

[1] => Array
(
[href] => http://pear.php.net/package/Services_Delicious
[description] => Services_Delicious
[hash] => f1b8052581b76f614ebc6ed2570320af
[tag] => Array
(
[0] => it
[1] => folksonomy
)

[time] => 2005-08-19T14:36:00Z
)

[2] => Array
(
[href] => http://www.kriskrug.com/?p=276
[description] => del.icio.us Tools, Plugins and Add-ons
[hash] => 137f2e74ececa17c2e0775186256096e
[tag] => Array
(
[0] => it
[1] => folksonomy
)

[time] => 2005-08-19T13:13:58Z
)

[3] => Array
(
[href] => http://httpd.apache.org/docs/2.0/howto/ssi.html
[description] => Apache Server Side Includes
[hash] => 94ceb2964649cd423bcc5d743ca3a174
[tag] => Array
(
[0] => it
[1] => apache
[2] => ssi
)

[time] => 2005-08-19T12:01:51Z
)

[4] => Array
(
[href] => http://sourceforge.net/projects/scuttle/
[description] => Scuttle - delicious clone
[hash] => a7e56cba9c43b0565236d1b2e0997889
[tag] => Array
(
[0] => it
[1] => folksonomy
)

[time] => 2005-08-19T11:58:15Z
)

Actual result:
--------------
Array
(
)