Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Sep 3, 2022
1 parent e466b39 commit bfc1718
Show file tree
Hide file tree
Showing 75 changed files with 55,184 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.php export-ignore
test export-ignore
doc export-ignore
phpunit.xml.dist export-ignore
composer.lock export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Kimai API

JSON API for the Kimai time-tracking software: [API documentation](https://www.kimai.org/documentation/rest-api.html)

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 0.6
- Build package: io.swagger.codegen.languages.PhpClientCodegen

## Requirements

PHP 5.5 and later

## Installation & Usage

### Composer

To install the bindings via [Composer](http://getcomposer.org/):

```bash
composer require kimai/api-php
```


## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiToken
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');
// Configure API key authorization: apiUser
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-USER', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-USER', 'Bearer');

$apiInstance = new Swagger\Client\Api\ActivityApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project = ""; // string | Project ID to filter activities
$projects = ""; // string | Comma separated list of project IDs to filter activities
$visible = "1"; // string | Visibility status to filter activities. Allowed values: 1=visible, 2=hidden, 3=all (default: 1)
$globals = "1"; // string | Use if you want to fetch only global activities. Allowed values: true (default: false)
$globals_first = "globals_first_example"; // string | Deprecated parameter, value is not used any more
$order_by = ""; // string | The field by which results will be ordered. Allowed values: id, name, project (default: name)
$order = "order_example"; // string | The result order. Allowed values: ASC, DESC (default: ASC)
$term = "term_example"; // string | Free search term

try {
$result = $apiInstance->apiActivitiesGet($project, $projects, $visible, $globals, $globals_first, $order_by, $order, $term);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ActivityApi->apiActivitiesGet: ', $e->getMessage(), PHP_EOL;
}

?>
```
37 changes: 37 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "kimai/api-php",
"type": "library",
"description": "Swagger generated API stubs for Kimai",
"keywords": [
"kimai",
"swagger",
"php",
"sdk",
"api"
],
"homepage": "https://github.com/kimai/api-php",
"license": "MIT",
"authors": [
{
"name": "Kevin Papst",
"homepage": "https://www.kevinpapst.de"
},
{
"name": "Swagger and contributors",
"homepage": "https://github.com/swagger-api/swagger-codegen"
}
],
"require": {
"php": ">=5.5",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"autoload": {
"psr-4": { "Swagger\\Client\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "Swagger\\Client\\" : "test/" }
}
}
Loading

0 comments on commit bfc1718

Please sign in to comment.