Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ doc/ExamDto.md
doc/ExamType.md
doc/ExamsApi.md
doc/GradeDto.md
doc/InstallPluginRequest.md
doc/MySchoolDto.md
doc/PluginDto.md
doc/PluginTaskStatus.md
Expand Down Expand Up @@ -115,6 +116,7 @@ lib/src/model/enrol_student_command.dart
lib/src/model/exam_dto.dart
lib/src/model/exam_type.dart
lib/src/model/grade_dto.dart
lib/src/model/install_plugin_request.dart
lib/src/model/my_school_dto.dart
lib/src/model/plugin_dto.dart
lib/src/model/plugin_task_status.dart
Expand Down Expand Up @@ -143,3 +145,4 @@ lib/src/model/user_class_dto.dart
lib/src/model/user_state.dart
lib/src/serializers.dart
pubspec.yaml
test/install_plugin_request_test.dart
8 changes: 6 additions & 2 deletions lib/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Class | Method | HTTP request | Description
[*AgendasApi*](doc/AgendasApi.md) | [**apiAgendasSearchGet**](doc/AgendasApi.md#apiagendassearchget) | **GET** /api/Agendas/search |
[*AppApi*](doc/AppApi.md) | [**apiAppGet**](doc/AppApi.md#apiappget) | **GET** /api/App |
[*AppApi*](doc/AppApi.md) | [**apiAppSchoolSystemsGet**](doc/AppApi.md#apiappschoolsystemsget) | **GET** /api/App/school-systems |
[*AppApi*](doc/AppApi.md) | [**testEndpointWithAuth**](doc/AppApi.md#testendpointwithauth) | **GET** /api/App/test |
[*ApplicationUsersApi*](doc/ApplicationUsersApi.md) | [**apiApplicationUsersGet**](doc/ApplicationUsersApi.md#apiapplicationusersget) | **GET** /api/ApplicationUsers |
[*ApplicationUsersApi*](doc/ApplicationUsersApi.md) | [**apiApplicationUsersIdDelete**](doc/ApplicationUsersApi.md#apiapplicationusersiddelete) | **DELETE** /api/ApplicationUsers/{id} |
[*ApplicationUsersApi*](doc/ApplicationUsersApi.md) | [**apiApplicationUsersIdGet**](doc/ApplicationUsersApi.md#apiapplicationusersidget) | **GET** /api/ApplicationUsers/{id} |
Expand All @@ -100,6 +99,10 @@ Class | Method | HTTP request | Description
[*ExamsApi*](doc/ExamsApi.md) | [**apiExamsPut**](doc/ExamsApi.md#apiexamsput) | **PUT** /api/Exams |
[*ExamsApi*](doc/ExamsApi.md) | [**apiExamsSearchGet**](doc/ExamsApi.md#apiexamssearchget) | **GET** /api/Exams/search |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsGet**](doc/PluginsApi.md#apipluginsget) | **GET** /api/Plugins |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsInstallPost**](doc/PluginsApi.md#apipluginsinstallpost) | **POST** /api/Plugins/install |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsNameDelete**](doc/PluginsApi.md#apipluginsnamedelete) | **DELETE** /api/Plugins/{name} |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsNameUpdatePost**](doc/PluginsApi.md#apipluginsnameupdatepost) | **POST** /api/Plugins/{name}/update |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsRegistryGet**](doc/PluginsApi.md#apipluginsregistryget) | **GET** /api/Plugins/registry |
[*PluginsApi*](doc/PluginsApi.md) | [**apiPluginsSchedulerGet**](doc/PluginsApi.md#apipluginsschedulerget) | **GET** /api/Plugins/scheduler |
[*SchoolSystemsApi*](doc/SchoolSystemsApi.md) | [**apiSchoolSystemsGet**](doc/SchoolSystemsApi.md#apischoolsystemsget) | **GET** /api/SchoolSystems |
[*SchoolSystemsApi*](doc/SchoolSystemsApi.md) | [**apiSchoolSystemsIdDelete**](doc/SchoolSystemsApi.md#apischoolsystemsiddelete) | **DELETE** /api/SchoolSystems/{id} |
Expand Down Expand Up @@ -153,6 +156,7 @@ Class | Method | HTTP request | Description
- [ExamDto](doc/ExamDto.md)
- [ExamType](doc/ExamType.md)
- [GradeDto](doc/GradeDto.md)
- [InstallPluginRequest](doc/InstallPluginRequest.md)
- [MySchoolDto](doc/MySchoolDto.md)
- [PluginDto](doc/PluginDto.md)
- [PluginTaskStatus](doc/PluginTaskStatus.md)
Expand Down Expand Up @@ -189,7 +193,7 @@ Authentication schemes defined for the API:

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://example.com/authorize
- **Authorization URL**: http://localhost:8080/realms/polyglot/authorize
- **Scopes**:
- **openid**: OpenID Connect
- **profile**: User profile
Expand Down
39 changes: 0 additions & 39 deletions lib/api/doc/AppApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**apiAppGet**](AppApi.md#apiappget) | **GET** /api/App |
[**apiAppSchoolSystemsGet**](AppApi.md#apiappschoolsystemsget) | **GET** /api/App/school-systems |
[**testEndpointWithAuth**](AppApi.md#testendpointwithauth) | **GET** /api/App/test |


# **apiAppGet**
Expand Down Expand Up @@ -92,41 +91,3 @@ This endpoint does not need any parameter.

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **testEndpointWithAuth**
> testEndpointWithAuth()



### Example
```dart
import 'package:schuly_api/api.dart';
// TODO Configure OAuth2 access token for authorization: OAuth2
//defaultApiClient.getAuthentication<OAuth>('OAuth2').accessToken = 'YOUR_ACCESS_TOKEN';

final api = SchulyApi().getAppApi();

try {
api.testEndpointWithAuth();
} catch on DioException (e) {
print('Exception when calling AppApi->testEndpointWithAuth: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

void (empty response body)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions lib/api/doc/CreateClassCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**description** | **String** | |
**schoolId** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
16 changes: 16 additions & 0 deletions lib/api/doc/InstallPluginRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# schuly_api.model.InstallPluginRequest

## Load the model package
```dart
import 'package:schuly_api/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | |
**version** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


168 changes: 168 additions & 0 deletions lib/api/doc/PluginsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ All URIs are relative to *http://localhost:5033*
Method | HTTP request | Description
------------- | ------------- | -------------
[**apiPluginsGet**](PluginsApi.md#apipluginsget) | **GET** /api/Plugins |
[**apiPluginsInstallPost**](PluginsApi.md#apipluginsinstallpost) | **POST** /api/Plugins/install |
[**apiPluginsNameDelete**](PluginsApi.md#apipluginsnamedelete) | **DELETE** /api/Plugins/{name} |
[**apiPluginsNameUpdatePost**](PluginsApi.md#apipluginsnameupdatepost) | **POST** /api/Plugins/{name}/update |
[**apiPluginsRegistryGet**](PluginsApi.md#apipluginsregistryget) | **GET** /api/Plugins/registry |
[**apiPluginsSchedulerGet**](PluginsApi.md#apipluginsschedulerget) | **GET** /api/Plugins/scheduler |


Expand Down Expand Up @@ -52,6 +56,170 @@ This endpoint does not need any parameter.

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiPluginsInstallPost**
> apiPluginsInstallPost(installPluginRequest)



### Example
```dart
import 'package:schuly_api/api.dart';
// TODO Configure OAuth2 access token for authorization: OAuth2
//defaultApiClient.getAuthentication<OAuth>('OAuth2').accessToken = 'YOUR_ACCESS_TOKEN';

final api = SchulyApi().getPluginsApi();
final InstallPluginRequest installPluginRequest = ; // InstallPluginRequest |

try {
api.apiPluginsInstallPost(installPluginRequest);
} catch on DioException (e) {
print('Exception when calling PluginsApi->apiPluginsInstallPost: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**installPluginRequest** | [**InstallPluginRequest**](InstallPluginRequest.md)| |

### Return type

void (empty response body)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: application/json, text/json, application/*+json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiPluginsNameDelete**
> apiPluginsNameDelete(name)



### Example
```dart
import 'package:schuly_api/api.dart';
// TODO Configure OAuth2 access token for authorization: OAuth2
//defaultApiClient.getAuthentication<OAuth>('OAuth2').accessToken = 'YOUR_ACCESS_TOKEN';

final api = SchulyApi().getPluginsApi();
final String name = name_example; // String |

try {
api.apiPluginsNameDelete(name);
} catch on DioException (e) {
print('Exception when calling PluginsApi->apiPluginsNameDelete: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **String**| |

### Return type

void (empty response body)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiPluginsNameUpdatePost**
> apiPluginsNameUpdatePost(name)



### Example
```dart
import 'package:schuly_api/api.dart';
// TODO Configure OAuth2 access token for authorization: OAuth2
//defaultApiClient.getAuthentication<OAuth>('OAuth2').accessToken = 'YOUR_ACCESS_TOKEN';

final api = SchulyApi().getPluginsApi();
final String name = name_example; // String |

try {
api.apiPluginsNameUpdatePost(name);
} catch on DioException (e) {
print('Exception when calling PluginsApi->apiPluginsNameUpdatePost: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **String**| |

### Return type

void (empty response body)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiPluginsRegistryGet**
> apiPluginsRegistryGet()



### Example
```dart
import 'package:schuly_api/api.dart';
// TODO Configure OAuth2 access token for authorization: OAuth2
//defaultApiClient.getAuthentication<OAuth>('OAuth2').accessToken = 'YOUR_ACCESS_TOKEN';

final api = SchulyApi().getPluginsApi();

try {
api.apiPluginsRegistryGet();
} catch on DioException (e) {
print('Exception when calling PluginsApi->apiPluginsRegistryGet: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

void (empty response body)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiPluginsSchedulerGet**
> BuiltList<PluginTaskStatus> apiPluginsSchedulerGet()

Expand Down
1 change: 1 addition & 0 deletions lib/api/lib/schuly_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export 'package:schuly_api/src/model/enrol_student_command.dart';
export 'package:schuly_api/src/model/exam_dto.dart';
export 'package:schuly_api/src/model/exam_type.dart';
export 'package:schuly_api/src/model/grade_dto.dart';
export 'package:schuly_api/src/model/install_plugin_request.dart';
export 'package:schuly_api/src/model/my_school_dto.dart';
export 'package:schuly_api/src/model/plugin_dto.dart';
export 'package:schuly_api/src/model/plugin_task_status.dart';
Expand Down
50 changes: 0 additions & 50 deletions lib/api/lib/src/api/app_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,54 +177,4 @@ class AppApi {
);
}

/// testEndpointWithAuth
///
///
/// Parameters:
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
///
/// Returns a [Future]
/// Throws [DioException] if API call or serialization fails
Future<Response<void>> testEndpointWithAuth({
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
ValidateStatus? validateStatus,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final _path = r'/api/App/test';
final _options = Options(
method: r'GET',
headers: <String, dynamic>{
...?headers,
},
extra: <String, dynamic>{
'secure': <Map<String, String>>[
{
'type': 'oauth2',
'name': 'OAuth2',
},
],
...?extra,
},
validateStatus: validateStatus,
);

final _response = await _dio.request<Object>(
_path,
options: _options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);

return _response;
}

}
Loading
Loading