Source for file Story.php
Documentation is available at Story.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* Story class for Digg API
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @author Joe Stump <joe@joestump.net>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Services_Digg
* @author Joe Stump <joe@joestump.net>
* Any function you call via this (ie. comments()) requires you to pass
* a numeric story ID. The optional second argument is the normal $params
* argument passed to most API calls.
* @param string $function
* @throws Services_Digg_Exception
public function __call($function, array $args)
if (!isset ($args[0 ]) || !is_numeric ($args[0 ])) {
if (isset ($args[1 ]) && is_array ($args[1 ]) && count ($args[1 ])) {
$endPoint = '/story/' . $story . '/' . $function;
* Get comment activity for a story
* @param int $story Story ID
* @param array $params Digg API arguments
* @throws Services_Digg_Exception
$endPoint = '/story/' . $this->id . '/activity/comments';
* Get a specific comment on a story
* @param int $commentid ID of comment to fetch
* @param array $params Digg API arguments
* @throws Services_Digg_Exception
$endPoint = '/story/' . $this->id . '/comment/' . $commentid;
return $result->comments [0 ];
* Get digg activity for a story
* @param int $story Story ID
* @param array $params Digg API arguments
* @throws Services_Digg_Exception
$endPoint = '/story/' . $this->id . '/activity/diggs';
Documentation generated on Tue, 04 Dec 2007 15:00:12 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|