[PEPr] Comment on Web Services::Services_OAuthUploader

From: Date: Fri, 25 Feb 2011 20:44:22 +0000
Subject: [PEPr] Comment on Web Services::Services_OAuthUploader
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54116@lists.php.net to get a copy of this message
Looks great. My feedback: 1.) Is this package specific to twitter? The main class and subclasses use TWITTER_VERIFY_CREDENTIALS_JSON, can the Twitter stuff be made optional or is OAuth uploading specific to twitter? 2.) exception does not need to extend pear_exception 3.) you should clone the http_request object before calling send(), use it as a template object. This will prevent the state of previous calls from breaking subsequent calls. 4.) consider using http_build_query to build post data 5.) use $class instead of $clazz 6.) if json_parse returns null (bad response data), calling property_exists on the result will cause a php warning 7.) docs for pre and postUpload in concrete classes are incomplete. They should at least link to the parent method docs. Parent method docs don't say what the methods do. 8.) add a setRequest method that lets you set the HTTP_Request2 object to use after constructing the object 9.) add a setConsumer method that lets you set the HTTP_OAuth_Consumer object to use after constructing the object 10.) it doesn't matter to me, but you can probably lower the required php version to 5.1.2 -- http://pear.php.net/pepr/pepr-proposal-show.php?id=650

« previous php.pear.dev (#54116) next »