192 lines
5.2 KiB
Markdown
192 lines
5.2 KiB
Markdown
# manager_api_new.api.SectionQuizApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *https://localhost:5001*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**sectionQuizCreate**](SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions |
|
|
[**sectionQuizDelete**](SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} |
|
|
[**sectionQuizGetAllQuizQuestionFromSection**](SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions |
|
|
[**sectionQuizUpdate**](SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz |
|
|
|
|
|
|
# **sectionQuizCreate**
|
|
> QuizQuestion sectionQuizCreate(sectionId, questionDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = SectionQuizApi();
|
|
final sectionId = sectionId_example; // String |
|
|
final questionDTO = QuestionDTO(); // QuestionDTO |
|
|
|
|
try {
|
|
final result = api_instance.sectionQuizCreate(sectionId, questionDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SectionQuizApi->sectionQuizCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**sectionId** | **String**| |
|
|
**questionDTO** | [**QuestionDTO**](QuestionDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**QuizQuestion**](QuizQuestion.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **sectionQuizDelete**
|
|
> String sectionQuizDelete(quizQuestionId)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = SectionQuizApi();
|
|
final quizQuestionId = 56; // int |
|
|
|
|
try {
|
|
final result = api_instance.sectionQuizDelete(quizQuestionId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SectionQuizApi->sectionQuizDelete: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**quizQuestionId** | **int**| |
|
|
|
|
### Return type
|
|
|
|
**String**
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **sectionQuizGetAllQuizQuestionFromSection**
|
|
> List<QuestionDTO> sectionQuizGetAllQuizQuestionFromSection(sectionId)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = SectionQuizApi();
|
|
final sectionId = sectionId_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.sectionQuizGetAllQuizQuestionFromSection(sectionId);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SectionQuizApi->sectionQuizGetAllQuizQuestionFromSection: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**sectionId** | **String**| |
|
|
|
|
### Return type
|
|
|
|
[**List<QuestionDTO>**](QuestionDTO.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **sectionQuizUpdate**
|
|
> QuizQuestion sectionQuizUpdate(questionDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = SectionQuizApi();
|
|
final questionDTO = QuestionDTO(); // QuestionDTO |
|
|
|
|
try {
|
|
final result = api_instance.sectionQuizUpdate(questionDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SectionQuizApi->sectionQuizUpdate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**questionDTO** | [**QuestionDTO**](QuestionDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**QuizQuestion**](QuizQuestion.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|