cvs: pear /Services_Delicious Delicious.php package.xml /Services_Delicious/tests bug8528.phpt config.php
| From: | Tatsuya Tsuruoka | Date: | Sat, 02 Sep 2006 14:15:14 +0000 |
| Subject: | cvs: pear /Services_Delicious Delicious.php package.xml /Services_Delicious/tests bug8528.phpt config.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-41955@lists.php.net to get a copy of this message | ||
ttsuruoka Sat Sep 2 14:15:14 2006 UTC
Added files:
/pear/Services_Delicious/tests bug8528.phpt
Modified files:
/pear/Services_Delicious Delicious.php package.xml
/pear/Services_Delicious/tests config.php
Log:
Fixed bug#8528: Invalid response code
http://cvs.php.net/viewvc.cgi/pear/Services_Delicious/Delicious.php?r1=1.5&r2=1.6&diff_format=u
Index: pear/Services_Delicious/Delicious.php
diff -u pear/Services_Delicious/Delicious.php:1.5 pear/Services_Delicious/Delicious.php:1.6
--- pear/Services_Delicious/Delicious.php:1.5 Wed Jun 28 11:52:55 2006
+++ pear/Services_Delicious/Delicious.php Sat Sep 2 14:15:14 2006
@@ -16,7 +16,7 @@
// | Authors: Stephan Schmidt <schst@php-tools.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Delicious.php,v 1.5 2006/06/28 11:52:55 ttsuruoka Exp $
+// $Id: Delicious.php,v 1.6 2006/09/02 14:15:14 ttsuruoka Exp $
/**
* uses PEAR error management
@@ -51,7 +51,7 @@
* @author Stephan Schmidt <schst@phap-tools.net>
* @author Tatsuya Tsuruoka <ttsuruoka@p4life.jp>
* @package Services_Delicious
- * @version 0.3
+ * @version 0.5
*/
class Services_Delicious
{
@@ -61,7 +61,7 @@
* @access private
* @var string
*/
- var $_apiUrl = 'http://del.icio.us/api';
+ var $_apiUrl = 'https://api.del.icio.us/v1';
/**
* Username
@@ -362,8 +362,8 @@
$request = &new HTTP_Request($url);
$request->setBasicAuth($this->_user, $this->_passwd);
- $request->addHeader('User-Agent', 'PEAR::Services_Delicious' );
-
+ $request->addHeader('User-Agent', 'PEAR::Services_Delicious');
+
$request->sendRequest();
if ($request->getResponseCode() !== 200) {
return PEAR::raiseError('Invalid Response Code',
$request->getResponseCode());
http://cvs.php.net/viewvc.cgi/pear/Services_Delicious/package.xml?r1=1.6&r2=1.7&diff_format=u
Index: pear/Services_Delicious/package.xml
diff -u pear/Services_Delicious/package.xml:1.6 pear/Services_Delicious/package.xml:1.7
--- pear/Services_Delicious/package.xml:1.6 Wed Jun 28 12:05:17 2006
+++ pear/Services_Delicious/package.xml Sat Sep 2 14:15:14 2006
@@ -22,15 +22,16 @@
</maintainer>
</maintainers>
<release>
- <version>0.4.0</version>
- <date>2006-06-28</date>
+ <version>0.5.0</version>
+ <date>2006-09-02</date>
<license>PHP License</license>
<state>beta</state>
- <notes>- Implemented request #8044: Private saving of bookmarks</notes>
+ <notes>- Fixed bug #8528: Invalid response code</notes>
<deps>
<dep type="pkg" rel="has" optional="no">PEAR</dep>
<dep type="pkg" rel="has"
optional="no">HTTP_Request</dep>
<dep type="pkg" rel="ge" version="0.12.0"
optional="no">XML_Serializer</dep>
+ <dep type="ext" rel="has" optional="no">openssl</dep>
</deps>
<filelist>
<dir name="/" baseinstalldir="Services">
@@ -52,6 +53,13 @@
</release>
<changelog>
<release>
+ <version>0.4.0</version>
+ <date>2006-06-28</date>
+ <license>PHP License</license>
+ <state>beta</state>
+ <notes>- Implemented request #8044: Private saving of bookmarks</notes>
+ </release>
+ <release>
<version>0.1</version>
<date>2004-11-05</date>
<license>PHP License</license>
http://cvs.php.net/viewvc.cgi/pear/Services_Delicious/tests/config.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Services_Delicious/tests/config.php
diff -u pear/Services_Delicious/tests/config.php:1.1 pear/Services_Delicious/tests/config.php:1.2
--- pear/Services_Delicious/tests/config.php:1.1 Sun Apr 23 17:02:13 2006
+++ pear/Services_Delicious/tests/config.php Sat Sep 2 14:15:14 2006
@@ -1,6 +1,10 @@
<?php
-$username = '';
-$password = '';
+if (file_exists('config-local.php')) {
+ require_once 'config-local.php';
+} else {
+ $username = '';
+ $password = '';
+}
if (empty($username)) {
echo 'add your username and password';
http://cvs.php.net/viewvc.cgi/pear/Services_Delicious/tests/bug8528.phpt?view=markup&rev=1.1
Index: pear/Services_Delicious/tests/bug8528.phpt
+++ pear/Services_Delicious/tests/bug8528.phpt
--TEST--
Services_Delicious:bug#8528
--SKIPIF--
--FILE--
<?php
require_once 'config.php';
require_once 'Services/Delicious.php';
$dlc = new Services_Delicious($username, $password);
$result = $dlc->getRecentPosts();
if (PEAR::isError($result)) {
echo $result->message;
} else {
echo 'OK';
}
?>
--EXPECT--
OK