Method | Description | |
---|---|---|
__construct ( ) | ||
authenticate ( string $username, string $password ) : array | Authenticates a user and returns the API key. | |
getActiveRecording ( string $apiKey ) : array | Returns an array with values of the currently active recording. | |
getCustomers ( string $apiKey ) : array | boolean | Return a list of customers. A customer can only see himself. | |
getExpenseRecord ( string $apiKey, integer $id ) : array | ||
getExpenses ( string $apiKey, integer $from, integer $to, integer $refundable, integer $cleared, integer $start, integer $limit ) : array | Returns a list of expenses. | |
getProjects ( string $apiKey, $includeTasks = false ) : array | boolean | Return a list of projects. Customers are only shown their projects. | |
getTasks ( string $apiKey, integer | array $projectId = null ) : array | boolean | Return a list of tasks. Customers are only shown tasks which are used for them. If a project is set as filter via the project parameter only tasks for that project are shown. | |
getTimesheet ( string $apiKey, integer $from, integer $to, integer $cleared, integer $start, integer $limit ) : array | Returns a list of recorded times. | |
getTimesheetRecord ( string $apiKey, integer $id ) : array | ||
getUsers ( string $apiKey ) : array | boolean | Return a list of users. Customers are not shown any users. The type of the current user decides which users are shown to him. | |
removeExpenseRecord ( string $apiKey, integer $id ) : array | ||
removeTimesheetRecord ( string $apiKey, integer $id ) : array | ||
setExpenseRecord ( string $apiKey, array $record, boolean $doUpdate ) : array | ||
setTimesheetRecord ( string $apiKey, array $record, boolean $doUpdate ) : array | ||
startRecord ( string $apiKey, integer $projectId, integer $activityId ) : array | The user started the recording of an activity via the buzzer. If this method is called while another recording is running the first one will be stopped. | |
stopRecord ( string $apiKey, integer $entryId ) : boolean | Stops the currently running recording. If $entryId is empty the current activity will be stopped. |
Method | Description | |
---|---|---|
getAuthErrorResult ( ) : array | Returns the result array for failed authentication. | |
getAuthenticator ( ) : Kimai_Auth_Abstract | Returns the configured Authenticator for Kimai. | |
getDebugResult ( array $items, array $debugItems ) : array | Returns the array for success responses. | |
getErrorResult ( string $msg = null ) : array | Returns the array for failure messages. | |
getSuccessResult ( array $items, integer $total ) : array | Returns the array for success responses. |
Method | Description | |
---|---|---|
getBackend ( ) : Kimai_Remote_Database | Returns the database object to access Kimais system. | |
getKimaiEnv ( ) : integer | null | Returns the current kimai environment. | |
getTasksByProjectId ( string $projectId, array $user ) : array | Returns an array of tasks for the given projectId. | |
getUser ( ) : array | Returns the current users config array. | |
init ( string $apiKey, string $permission = null, $allowCustomer = false ) : boolean | Checks if the given $apiKey is allowed to fetch data from this system. |
public getActiveRecording ( string $apiKey ) : array | ||
$apiKey | string | |
return | array |
protected getAuthErrorResult ( ) : array | ||
return | array |
protected getAuthenticator ( ) : Kimai_Auth_Abstract | ||
return | Kimai_Auth_Abstract |
protected getErrorResult ( string $msg = null ) : array | ||
$msg | string | |
return | array |
public getExpenses ( string $apiKey, integer $from, integer $to, integer $refundable, integer $cleared, integer $start, integer $limit ) : array | ||
$apiKey | string | |
$from | integer | a MySQL DATE/DATETIME/TIMESTAMP |
$to | integer | a MySQL DATE/DATETIME/TIMESTAMP |
$refundable | integer | -1 all, 0 only refundable |
$cleared | integer | -1 no filtering, 0 uncleared only, 1 cleared only |
$start | integer | limit start |
$limit | integer | count rows to select |
return | array |
public getTimesheet ( string $apiKey, integer $from, integer $to, integer $cleared, integer $start, integer $limit ) : array | ||
$apiKey | string | |
$from | integer | a MySQL DATE/DATETIME/TIMESTAMP |
$to | integer | a MySQL DATE/DATETIME/TIMESTAMP |
$cleared | integer | -1 no filtering, 0 uncleared only, 1 cleared only |
$start | integer | limit start |
$limit | integer | count rows to select |
return | array |