cvs: pear /Services_Ebay Ebay.php /Services_Ebay/examples example_AvailableCalls.php

From: Date: Fri, 26 Nov 2004 16:18:24 +0000
Subject: cvs: pear /Services_Ebay Ebay.php /Services_Ebay/examples example_AvailableCalls.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-26521@lists.php.net to get a copy of this message
schst Fri Nov 26 11:18:24 2004 EDT Added files: /pear/Services_Ebay/examples example_AvailableCalls.php Modified files: /pear/Services_Ebay Ebay.php Log: added getAvailableCalls() http://cvs.php.net/diff.php/pear/Services_Ebay/Ebay.php?r1=1.4&r2=1.5&ty=u Index: pear/Services_Ebay/Ebay.php diff -u pear/Services_Ebay/Ebay.php:1.4 pear/Services_Ebay/Ebay.php:1.5 --- pear/Services_Ebay/Ebay.php:1.4 Sun Nov 7 07:48:51 2004 +++ pear/Services_Ebay/Ebay.php Fri Nov 26 11:18:24 2004 @@ -16,7 +16,7 @@ // | Authors: Stephan Schmidt <schst@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Ebay.php,v 1.4 2004/11/07 12:48:51 schst Exp $ +// $Id: Ebay.php,v 1.5 2004/11/26 16:18:24 schst Exp $ /** * Services/Ebay.php @@ -321,5 +321,27 @@ return $model; } + + /** + * get list of all available API calls + * + * This can be used to check, whether an API call already has + * been implemented + * + * @return array list of all available calls + */ + public function getAvailableApiCalls() + { + $calls = array(); + + $it = new DirectoryIterator(SERVICES_EBAY_BASEDIR . '/Ebay/Call'); + foreach ($it as $file) { + if (!$file->isFile()) { + continue; + } + array_push($calls, substr($file->getFilename(), 0, -4)); + } + return $calls; + } } ?> \ No newline at end of file http://cvs.php.net/co.php/pear/Services_Ebay/examples/example_AvailableCalls.php?r=1.1&p=1 Index: pear/Services_Ebay/examples/example_AvailableCalls.php +++ pear/Services_Ebay/examples/example_AvailableCalls.php <?PHP /** * example that fetches all transactions for an item * * $Id: example_AvailableCalls.php,v 1.1 2004/11/26 16:18:24 schst Exp $ * * @package Services_Ebay * @subpackage Examples * @author Stephan Schmidt */ error_reporting(E_ALL); require_once '../Ebay.php'; require_once 'config.php'; $session = Services_Ebay::getSession($devId, $appId, $certId); $session->setToken($token); $ebay = new Services_Ebay($session); $calls = $ebay->getAvailableApiCalls(); echo '<pre>'; print_r($calls); echo '</pre>'; ?>

« previous php.pear.cvs (#26521) next »