Skip to content

Commit

Permalink
feat: automated openapi client update
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger authored and gopadz committed Jun 2, 2024
1 parent 81e8d6f commit 0aea0ae
Showing 29 changed files with 6,183 additions and 143 deletions.
15 changes: 15 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -2,9 +2,14 @@
.php-cs-fixer.dist.php
README.md
docs/Api/AuthApi.md
docs/Api/ProfileApi.md
docs/Api/TeamApi.md
docs/Api/UserApi.md
docs/Model/AuthLogin.md
docs/Model/AuthToken.md
docs/Model/AuthVerify.md
docs/Model/Notification.md
docs/Model/Profile.md
docs/Model/Team.md
docs/Model/TeamUserParams.md
docs/Model/TeamUsers.md
@@ -17,13 +22,18 @@ docs/Model/UserTeams.md
docs/Model/Users.md
docs/Model/Validation.md
lib/Api/AuthApi.php
lib/Api/ProfileApi.php
lib/Api/TeamApi.php
lib/Api/UserApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/Model/AuthLogin.php
lib/Model/AuthToken.php
lib/Model/AuthVerify.php
lib/Model/ModelInterface.php
lib/Model/Notification.php
lib/Model/Profile.php
lib/Model/Team.php
lib/Model/TeamUserParams.php
lib/Model/TeamUsers.php
@@ -37,3 +47,8 @@ lib/Model/Users.php
lib/Model/Validation.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/ProfileApiTest.php
test/Model/AuthLoginTest.php
test/Model/AuthTokenTest.php
test/Model/AuthVerifyTest.php
test/Model/ProfileTest.php
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gopad: SDK for PHP

[![General Workflow](https://github.com/gopad/gopad-php/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-php/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/35b2dc9119fe46f29cc53725ca5bf90b)](https://app.codacy.com/gh/gopad/gopad-php/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![PHP Version](https://badge.fury.io/ph/gopad%2Fgopad-php.svg)](https://badge.fury.io/ph/gopad%2Fgopad-php)
[![General Workflow](https://github.com/gopad/gopad-php/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-php/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/35b2dc9119fe46f29cc53725ca5bf90b)](https://app.codacy.com/gh/gopad/gopad-php/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![PHP Version](https://badge.fury.io/ph/gopad%2Fgopad.svg)](https://badge.fury.io/ph/gopad%2Fgopad)

This repository provides a client SDK for PHP. This SDK is automatically
generated by the [OpenAPI Generator][generator] project:
197 changes: 197 additions & 0 deletions docs/Api/AuthApi.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ All URIs are relative to https://try.gopad.eu/api/v1, except if the operation de
| ------------- | ------------- | ------------- |
| [**externalCallback()**](AuthApi.md#externalCallback) | **GET** /auth/{provider}/callback | Callback for external authentication |
| [**externalInitialize()**](AuthApi.md#externalInitialize) | **GET** /auth/{provider}/initialize | Initialize the external authentication |
| [**loginAuth()**](AuthApi.md#loginAuth) | **POST** /auth/login | Authenticate an user by credentials |
| [**refreshAuth()**](AuthApi.md#refreshAuth) | **GET** /auth/refresh | Refresh an auth token before it expires |
| [**verifyAuth()**](AuthApi.md#verifyAuth) | **GET** /auth/verify | Verify validity for an authentication token |


## `externalCallback()`
@@ -121,3 +124,197 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `loginAuth()`

```php
loginAuth($authLogin): \Gopad\Model\AuthToken
```

Authenticate an user by credentials

### Example

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



$apiInstance = new Gopad\Api\AuthApi(
// 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()
);
$authLogin = new \Gopad\Model\AuthLogin(); // \Gopad\Model\AuthLogin | The credentials to authenticate

try {
$result = $apiInstance->loginAuth($authLogin);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->loginAuth: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **authLogin** | [**\Gopad\Model\AuthLogin**](../Model/AuthLogin.md)| The credentials to authenticate | |

### Return type

[**\Gopad\Model\AuthToken**](../Model/AuthToken.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **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)

## `refreshAuth()`

```php
refreshAuth(): \Gopad\Model\AuthToken
```

Refresh an auth token before it expires

### Example

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


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

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

// Configure API key authorization: Header
$config = Gopad\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Gopad\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

// Configure Bearer authorization: Bearer
$config = Gopad\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Gopad\Api\AuthApi(
// 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
);

try {
$result = $apiInstance->refreshAuth();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->refreshAuth: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Gopad\Model\AuthToken**](../Model/AuthToken.md)

### Authorization

[Cookie](../../README.md#Cookie), [Basic](../../README.md#Basic), [Header](../../README.md#Header), [Bearer](../../README.md#Bearer)

### 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)

## `verifyAuth()`

```php
verifyAuth(): \Gopad\Model\AuthVerify
```

Verify validity for an authentication token

### Example

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


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

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

// Configure API key authorization: Header
$config = Gopad\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Gopad\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

// Configure Bearer authorization: Bearer
$config = Gopad\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Gopad\Api\AuthApi(
// 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
);

try {
$result = $apiInstance->verifyAuth();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->verifyAuth: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Gopad\Model\AuthVerify**](../Model/AuthVerify.md)

### Authorization

[Cookie](../../README.md#Cookie), [Basic](../../README.md#Basic), [Header](../../README.md#Header), [Bearer](../../README.md#Bearer)

### 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)
Loading

0 comments on commit 0aea0ae

Please sign in to comment.