コード例 #1
0
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or    |
// | (at your option) any later version.                                  |
// |                                                                      |
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                        |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
require_once 'XML/RPC.php';
require_once 'Eventum_RPC.php';
$client = new Eventum_RPC();
$client->setURL('http://rabbit.impleo.net/rpc/xmlrpc.php');
$client->setCredentials('user', 'password');
$client->setDebug(true);
$id = 64;
try {
    $result = $client->getIssueDetails((int) $id);
} catch (Eventum_RPC_Exception $e) {
    echo $e->getMessage(), "\n";
    echo $e->getTraceAsString(), "\n";
    exit(1);
}
print_r($result);
コード例 #2
0
ファイル: xmlrpc_client.php プロジェクト: korusdipl/eventum
// |                                                                      |
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// | Authors: Elan Ruusamäe <*****@*****.**>                               |
// +----------------------------------------------------------------------+
require_once 'XML/RPC.php';
require_once 'Eventum_RPC.php';
$client = new Eventum_RPC();
$client->setURL("http://rabbit.impleo.net/rpc/xmlrpc.php");
$client->setCredentials("user", "password");
$client->setDebug(true);
$id = 64;
try {
    $result = $client->getIssueDetails((int) $id);
} catch (Eventum_RPC_Exception $e) {
    echo $e->getMessage(), "\n";
    echo $e->getTraceAsString(), "\n";
    exit(1);
}
print_r($result);
コード例 #3
0
ファイル: eventum.php プロジェクト: korusdipl/eventum
if (empty($port)) {
    $port = 80;
}
if (empty($relative_url)) {
    $relative_url = '/';
}
if (count($argv) == 1) {
    Command_Line::quit('Requirement argument not found');
}
// show usage information if user gave --help
if ($argv[1] == '--help' || $argv[1] == 'help') {
    Command_Line::usage(__FILE__);
}
$should_confirm = Command_Line::isSafeExecution();
$scheme = $port == 443 ? 'https' : 'http';
$client = new Eventum_RPC("{$scheme}://{$hostname}{$relative_url}/rpc/xmlrpc.php");
//$client->setCredentials($user_email, $user_password);
if (in_array('--debug', $argv)) {
    $client->setDebug(true);
    $debug = true;
    unset($argv[array_search('--debug', $argv)]);
} else {
    $debug = false;
}
$auth = array($user_email, $user_password);
$issue_id = (int) $argv[1];
try {
    if ($issue_id > 0) {
        if (count($argv) == 2) {
            Command_Line::printIssueDetails($client, $auth, $issue_id);
        } else {