Skip to content

Commit

Permalink
add EventumXmlRpcClient with method annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed May 1, 2018
1 parent 9607ddd commit 857d7e7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 7 deletions.
11 changes: 7 additions & 4 deletions XMLRPC.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Available XMLRPC methods ##

Here are available XMLRPC methods in [Eventum](https://github.com/eventum/eventum) as of version 3.0.2.
Here are available XMLRPC methods in [Eventum](https://github.com/eventum/eventum) as of version 3.4.0.
The methods themselves are defined in [RemoteApi](https://github.com/eventum/eventum/blob/master/lib/eventum/rpc/RemoteApi.php) class in Eventum codebase.
This output is created with Eventum [CLI](https://github.com/eventum/cli) application [DumpMethods](https://github.com/eventum/cli/blob/master/src/Command/DumpMethodsCommand.php) command.

Methods marked `@access public` do not require authentication, while `@access restricted` (default) require that you either use `setCredentials` to pass authentication credentials, or put `login` and `password` as first two parameters for the call.
Methods marked `@access public` do not require authentication, while `@access protected` (default) require that you either use `setCredentials` to pass authentication credentials, or put `login` and `password` as first two parameters for the call.

```php
/**
Expand Down Expand Up @@ -57,6 +57,7 @@ Methods marked `@access public` do not require authentication, while `@access re
* @param string $note
* @return string
* @access protected
* @since 3.3.0 checks user access and issue close state
*/
function closeIssue(int, string, int, boolean, string): string

Expand Down Expand Up @@ -231,11 +232,11 @@ Methods marked `@access public` do not require authentication, while `@access re
* @param DateTime $start
* @param DateTime $end
* @param struct $options
* @return string
* @return struct
* @access protected
* @since 3.0.2
*/
function getWeeklyReportData(int, string, string, struct): string
function getWeeklyReportData(int, string, string, struct): struct

/**
* @param string $email
Expand All @@ -249,6 +250,7 @@ Methods marked `@access public` do not require authentication, while `@access re
* @param string $command
* @return string
* @access protected
* @deprecated since 3.3.0 this method does nothing
*/
function logCommand(string): string

Expand Down Expand Up @@ -328,3 +330,4 @@ Methods marked `@access public` do not require authentication, while `@access re
* @access protected
*/
function unredeemIssue(int, array): string
```
6 changes: 3 additions & 3 deletions lib/Eventum_RPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* that were distributed with this source code.
*/

use Eventum\RPC\XmlRpcClient;
use Eventum\RPC\EventumXmlRpcClient;

/**
* @deprecated since 4.2.0, use \Eventum\RPC\XmlRpcClient
* @deprecated since 4.2.0, use \Eventum\RPC\EventumXmlRpcClient
*/
class Eventum_RPC extends XmlRpcClient
class Eventum_RPC extends EventumXmlRpcClient
{
}
60 changes: 60 additions & 0 deletions src/EventumXmlRpcClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

/*
* This file is part of the Eventum (Issue Tracking System) package.
*
* @copyright (c) Eventum Team
* @license GNU General Public License, version 2 or later (GPL-2+)
*
* For the full copyright and license information,
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/

namespace Eventum\RPC;

use DateTime;

/**
* @method string addAuthorizedReplier(int $issue_id, int $project_id, string $new_replier)
* @method struct addFile(int $issue_id, string $filename, string $mimetype, base64 $contents, string $file_description, bool $internal_only)
* @method string assignIssue(int $issue_id, int $project_id, string $developer)
* @method boolean checkAuthentication()
* @method string closeIssue(int $issue_id, string $new_status, int $resolution_id, bool $send_notification, string $note)
* @method string convertNote(int $issue_id, int $note_id, string $target, bool $authorize_sender)
* @method struct getAbbreviationAssocList(int $prj_id, bool $show_closed)
* @method struct getClosedAbbreviationAssocList(int $prj_id)
* @method struct getDeveloperList(int $prj_id)
* @method struct getDraft(int $issue_id, int $draft_id)
* @method array getDraftListing(int $issue_id)
* @method array getEmail(int $issue_id, int $email_id)
* @method array getEmailListing(int $issue_id)
* @method struct getFile(int $file_id)
* @method array getFileList(int $issue_id)
* @method array getIncidentTypes(int $issue_id, bool $redeemed_only)
* @method struct getIssueDetails(int $issue_id)
* @method array getNote(int $issue_id, int $note_id)
* @method array getNoteListing(int $issue_id)
* @method array getOpenIssues(int $prj_id, bool $show_all_issues, string $status)
* @method array getResolutionAssocList()
* @method string getServerParameter(string $parameter)
* @method struct getSimpleIssueDetails(int $issue_id)
* @method struct getTimeTrackingCategories(int $issue_id)
* @method array getUserAssignedProjects(bool $only_customer_projects)
* @method string getWeeklyReport(int $week, string $start, string $end, bool $separate_closed, int $prj_id)
* @method struct getWeeklyReportData(int $prj_id, DateTime $start, DateTime $end, struct $options)
* @method boolean isValidLogin(string $email, string $password)
* @method string logCommand(string $command)
* @method string lookupCustomer(int $prj_id, string $field, string $value)
* @method string mayChangeIssue(int $issue_id)
* @method string recordTimeWorked(int $issue_id, int $cat_id, string $summary, int $time_spent)
* @method string redeemIssue(int $issue_id, array $types)
* @method string sendDraft(int $issue_id, int $draft_id)
* @method string setIssueStatus(int $issue_id, string $new_status)
* @method string takeIssue(int $issue_id, int $project_id)
* @method string timeClock(string $action)
* @method string unredeemIssue(int $issue_id, array $types)
*/
class EventumXmlRpcClient extends XmlRpcClient
{
}

0 comments on commit 857d7e7

Please sign in to comment.