Skip to content

Commit

Permalink
add divisions endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko Heller committed Apr 26, 2024
1 parent bf072af commit a3592c5
Show file tree
Hide file tree
Showing 60 changed files with 8,279 additions and 153 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verdigado/gruene-api-client",
"version": "0.1.0",
"version": "0.2.0",
"description": "PHP client library for gruene api",
"keywords": [
"openapitools",
Expand Down
86 changes: 86 additions & 0 deletions docs/Api/DivisionsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Verdigado\GrueneApiClient\DivisionsApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**findDivisions()**](DivisionsApi.md#findDivisions) | **GET** /v1/divisions | Find divisions |


## `findDivisions()`

```php
findDivisions($limit, $offset, $hierarchy, $level, $division_key, $search): \Verdigado\GrueneApiClient\models\FindDivisionsResponse
```

Find divisions

### Example

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


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure HTTP basic authorization: basic
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');


$apiInstance = new Verdigado\GrueneApiClient\Api\DivisionsApi(
// 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
);
$limit = 20; // float
$offset = 3.4; // float
$hierarchy = GR; // string | Filter by hierarchy
$level = BV; // string | Filter by hierarchy level
$division_key = array('division_key_example'); // string[] | Filter by division keys
$search = 'search_example'; // string | Search name attributes for substring

try {
$result = $apiInstance->findDivisions($limit, $offset, $hierarchy, $level, $division_key, $search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionsApi->findDivisions: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **limit** | **float**| | [optional] [default to 20] |
| **offset** | **float**| | [optional] |
| **hierarchy** | **string**| Filter by hierarchy | [optional] |
| **level** | **string**| Filter by hierarchy level | [optional] |
| **division_key** | [**string[]**](../Model/string.md)| Filter by division keys | [optional] |
| **search** | **string**| Search name attributes for substring | [optional] |

### Return type

[**\Verdigado\GrueneApiClient\models\FindDivisionsResponse**](../Model/FindDivisionsResponse.md)

### Authorization

[api_key](../../README.md#api_key), [bearer](../../README.md#bearer), [basic](../../README.md#basic)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Api/HealthApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\HealthApi

All URIs are relative to https://app.gruene.de, except if the operation defines another base path.
All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
12 changes: 5 additions & 7 deletions docs/Api/NbApiApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\NbApiApi

All URIs are relative to https://app.gruene.de, except if the operation defines another base path.
All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand All @@ -13,7 +13,7 @@ All URIs are relative to https://app.gruene.de, except if the operation defines
## `findGroups()`

```php
findGroups($filter_external_refs_type, $filter_external_refs_key, $filter_level, $filter_type, $filter_slug, $filter_active): \Verdigado\GrueneApiClient\models\FindNbGroupsResponse
findGroups($filter_external_refs_type, $filter_external_refs_key, $filter_level, $filter_type, $filter_slug): \Verdigado\GrueneApiClient\models\FindNbGroupsResponse
```

Find all groups
Expand Down Expand Up @@ -47,10 +47,9 @@ $filter_external_refs_key = 12345678; // string | Filter by external reference I
$filter_level = 'filter_level_example'; // string | Filter by role level
$filter_type = EXECUTIVE_BOARD; // string | Filter by role type
$filter_slug = KV_EXECUTIVE_BOARD; // string | Filter by role slug
$filter_active = true; // string | Filter by active status. True by default

try {
$result = $apiInstance->findGroups($filter_external_refs_type, $filter_external_refs_key, $filter_level, $filter_type, $filter_slug, $filter_active);
$result = $apiInstance->findGroups($filter_external_refs_type, $filter_external_refs_key, $filter_level, $filter_type, $filter_slug);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NbApiApi->findGroups: ', $e->getMessage(), PHP_EOL;
Expand All @@ -66,7 +65,6 @@ try {
| **filter_level** | **string**| Filter by role level | [optional] |
| **filter_type** | **string**| Filter by role type | [optional] |
| **filter_slug** | **string**| Filter by role slug | [optional] |
| **filter_active** | **string**| Filter by active status. True by default | [optional] |

### Return type

Expand Down Expand Up @@ -223,7 +221,7 @@ try {
## `getRegionalChapter()`

```php
getRegionalChapter($division_key): \Verdigado\GrueneApiClient\models\NbRegionalChapterDto
getRegionalChapter($division_key): \Verdigado\GrueneApiClient\models\NbRegionalChapter
```

Get regional chapter by division key
Expand Down Expand Up @@ -270,7 +268,7 @@ try {

### Return type

[**\Verdigado\GrueneApiClient\models\NbRegionalChapterDto**](../Model/NbRegionalChapterDto.md)
[**\Verdigado\GrueneApiClient\models\NbRegionalChapter**](../Model/NbRegionalChapter.md)

### Authorization

Expand Down
10 changes: 5 additions & 5 deletions docs/Api/OffboardingApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\OffboardingApi

All URIs are relative to https://app.gruene.de, except if the operation defines another base path.
All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand All @@ -11,7 +11,7 @@ All URIs are relative to https://app.gruene.de, except if the operation defines
## `batchUpdateOffboardingServiceUsers()`

```php
batchUpdateOffboardingServiceUsers($batch_update_offboarding_service_users_dto)
batchUpdateOffboardingServiceUsers($batch_update_offboarding_service_users)
```

Batch update offboarding users for the authenticated service.
Expand All @@ -35,10 +35,10 @@ $apiInstance = new Verdigado\GrueneApiClient\Api\OffboardingApi(
new GuzzleHttp\Client(),
$config
);
$batch_update_offboarding_service_users_dto = new \Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsersDto(); // \Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsersDto
$batch_update_offboarding_service_users = new \Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsers(); // \Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsers

try {
$apiInstance->batchUpdateOffboardingServiceUsers($batch_update_offboarding_service_users_dto);
$apiInstance->batchUpdateOffboardingServiceUsers($batch_update_offboarding_service_users);
} catch (Exception $e) {
echo 'Exception when calling OffboardingApi->batchUpdateOffboardingServiceUsers: ', $e->getMessage(), PHP_EOL;
}
Expand All @@ -48,7 +48,7 @@ try {

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **batch_update_offboarding_service_users_dto** | [**\Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsersDto**](../Model/BatchUpdateOffboardingServiceUsersDto.md)| | |
| **batch_update_offboarding_service_users** | [**\Verdigado\GrueneApiClient\models\BatchUpdateOffboardingServiceUsers**](../Model/BatchUpdateOffboardingServiceUsers.md)| | |

### Return type

Expand Down
6 changes: 3 additions & 3 deletions docs/Api/UsersApi.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Verdigado\GrueneApiClient\UsersApi

All URIs are relative to https://app.gruene.de, except if the operation defines another base path.
All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**findUsers()**](UsersApi.md#findUsers) | **GET** /v0/users | Find users in ldap |
| [**findUsers()**](UsersApi.md#findUsers) | **GET** /v1/users | Find users |
| [**getSelf()**](UsersApi.md#getSelf) | **GET** /v1/users/self | Get the authenticated user |
| [**getUser()**](UsersApi.md#getUser) | **GET** /v1/users/{userId} | Get user by id |
| [**getUserRbacStructure()**](UsersApi.md#getUserRbacStructure) | **GET** /v1/users/{userId}/rbac-structure | Get user RBAC structure |
Expand All @@ -16,7 +16,7 @@ All URIs are relative to https://app.gruene.de, except if the operation defines
findUsers($search, $user_ids, $limit): \Verdigado\GrueneApiClient\models\FindUsersResponse
```

Find users in ldap
Find users

### Example

Expand Down
9 changes: 9 additions & 0 deletions docs/Model/Address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # Address

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zip** | **string** | Location zip code |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9 changes: 9 additions & 0 deletions docs/Model/BatchUpdateOffboardingServiceUsers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # BatchUpdateOffboardingServiceUsers

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**upsert** | [**\Verdigado\GrueneApiClient\models\UpsertOffboardingServiceUser[]**](UpsertOffboardingServiceUser.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
16 changes: 16 additions & 0 deletions docs/Model/Division.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# # Division

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | The division id |
**division_key** | **string** | The division key |
**name1** | **string** | |
**name2** | **string** | |
**short_name** | **string** | Descriptive name of the division. |
**hierarchy** | **object** | The root hierarchy the division belongs to |
**level** | **string** | Level in the hierarchy |
**office_address** | [**\Verdigado\GrueneApiClient\models\DivisionOfficeAddress**](DivisionOfficeAddress.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9 changes: 9 additions & 0 deletions docs/Model/DivisionOfficeAddress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # DivisionOfficeAddress

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zip** | **string** | Location zip code |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10 changes: 10 additions & 0 deletions docs/Model/FindDivisionsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# # FindDivisionsResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**\Verdigado\GrueneApiClient\models\Division[]**](Division.md) | |
**meta** | [**\Verdigado\GrueneApiClient\models\FindDivisionsResponseMeta**](FindDivisionsResponseMeta.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
12 changes: 12 additions & 0 deletions docs/Model/FindDivisionsResponseMeta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# # FindDivisionsResponseMeta

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **float** | | [optional]
**total** | **float** | | [optional]
**offset** | **float** | | [optional]
**limit** | **float** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/FindNbGroupsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\Verdigado\GrueneApiClient\models\NbGroupDto[]**](NbGroupDto.md) | |
**items** | [**\Verdigado\GrueneApiClient\models\NbGroup[]**](NbGroup.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/FindNbOrganizationsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\Verdigado\GrueneApiClient\models\NbOrganizationDto[]**](NbOrganizationDto.md) | |
**items** | [**\Verdigado\GrueneApiClient\models\NbOrganization[]**](NbOrganization.md) | |
**count** | **float** | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/FindNbRegionalChaptersResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **float** | |
**items** | [**\Verdigado\GrueneApiClient\models\NbRegionalChapterDto[]**](NbRegionalChapterDto.md) | |
**items** | [**\Verdigado\GrueneApiClient\models\NbRegionalChapter[]**](NbRegionalChapter.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/FindOffboardingUsersResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**\Verdigado\GrueneApiClient\models\OffboardingUserInfoDto[]**](OffboardingUserInfoDto.md) | |
**data** | [**\Verdigado\GrueneApiClient\models\OffboardingUserInfo[]**](OffboardingUserInfo.md) | |
**meta** | [**\Verdigado\GrueneApiClient\models\FindOffboardingUsersResponseMeta**](FindOffboardingUsersResponseMeta.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
3 changes: 1 addition & 2 deletions docs/Model/FindUsersResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\Verdigado\GrueneApiClient\models\User[]**](User.md) | |
**page_info** | [**\Verdigado\GrueneApiClient\models\PageInfo**](PageInfo.md) | | [optional]
**data** | [**\Verdigado\GrueneApiClient\models\User[]**](User.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10 changes: 10 additions & 0 deletions docs/Model/NbExternalRef.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# # NbExternalRef

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | Type of the external ref |
**key** | **string** | Id in the external system |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
15 changes: 15 additions & 0 deletions docs/Model/NbGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# # NbGroup

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | |
**slug** | **string** | |
**type** | **string** | |
**active** | **bool** | |
**level** | **string** | |
**organization** | [**\Verdigado\GrueneApiClient\models\NbOrganization**](NbOrganization.md) | |
**external_refs** | [**\Verdigado\GrueneApiClient\models\NbExternalRef[]**](NbExternalRef.md) | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
11 changes: 11 additions & 0 deletions docs/Model/NbOrganization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# # NbOrganization

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | Unique character code to identify organization |
**name** | **string** | Organization name |
**regional_chapter_id_prefix** | **string** | Division keys belonging to this organization are always beginning with this sequence. |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13 changes: 13 additions & 0 deletions docs/Model/NbRegionalChapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# # NbRegionalChapter

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | Id of the regional chapter (division key) |
**name** | **string** | Regional chapter name |
**type** | **string** | Regional chapter type Possible values: BV | LV | KV | OV |
**organization** | [**\Verdigado\GrueneApiClient\models\NbOrganization**](NbOrganization.md) | |
**zip_code** | **string** | Zip code of office location |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
11 changes: 11 additions & 0 deletions docs/Model/OffboardingUserInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# # OffboardingUserInfo

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | The User Id (Sherpa Id) |
**username** | **string** | The users username. Used to log in to Grünes Netz (gnetz username) |
**email** | **string** | The users email address. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Loading

0 comments on commit a3592c5

Please sign in to comment.