320 lines
8.0 KiB
Markdown
320 lines
8.0 KiB
Markdown
# managerapi.api.ResourceApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://localhost:5000*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**resourceCreate**](ResourceApi.md#resourcecreate) | **POST** /api/Resource |
|
|
[**resourceDelete**](ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
|
|
[**resourceGet**](ResourceApi.md#resourceget) | **GET** /api/Resource |
|
|
[**resourceGetDetail**](ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail |
|
|
[**resourceShow**](ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} |
|
|
[**resourceUpdate**](ResourceApi.md#resourceupdate) | **PUT** /api/Resource |
|
|
[**resourceUpload**](ResourceApi.md#resourceupload) | **POST** /api/Resource/upload |
|
|
|
|
|
|
# **resourceCreate**
|
|
> ResourceDTO resourceCreate(resourceDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final resourceDTO = ResourceDTO(); // ResourceDTO |
|
|
|
|
try {
|
|
final result = api_instance.resourceCreate(resourceDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**resourceDTO** | [**ResourceDTO**](ResourceDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**ResourceDTO**](ResourceDTO.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)
|
|
|
|
# **resourceDelete**
|
|
> String resourceDelete(id)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final id = id_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.resourceDelete(id);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceDelete: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
|
|
### 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)
|
|
|
|
# **resourceGet**
|
|
> List<ResourceDTO> resourceGet()
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
|
|
try {
|
|
final result = api_instance.resourceGet();
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceGet: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**List<ResourceDTO>**](ResourceDTO.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)
|
|
|
|
# **resourceGetDetail**
|
|
> ResourceDTO resourceGetDetail(id)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final id = id_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.resourceGetDetail(id);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceGetDetail: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
|
|
### Return type
|
|
|
|
[**ResourceDTO**](ResourceDTO.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)
|
|
|
|
# **resourceShow**
|
|
> MultipartFile resourceShow(id)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final id = id_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.resourceShow(id);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceShow: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
|
|
### Return type
|
|
|
|
[**MultipartFile**](MultipartFile.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/octet-stream, 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)
|
|
|
|
# **resourceUpdate**
|
|
> ResourceDTO resourceUpdate(resourceDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final resourceDTO = ResourceDTO(); // ResourceDTO |
|
|
|
|
try {
|
|
final result = api_instance.resourceUpdate(resourceDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceUpdate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**resourceDTO** | [**ResourceDTO**](ResourceDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**ResourceDTO**](ResourceDTO.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)
|
|
|
|
# **resourceUpload**
|
|
> String resourceUpload(label, type)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:managerapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = ResourceApi();
|
|
final label = label_example; // String |
|
|
final type = type_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.resourceUpload(label, type);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling ResourceApi->resourceUpload: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**label** | **String**| | [optional]
|
|
**type** | **String**| | [optional]
|
|
|
|
### Return type
|
|
|
|
**String**
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **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)
|
|
|