# openapi.api.AdminSupportContentApi

## Load the API package
```dart
import 'package:openapi/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create**](AdminSupportContentApi.md#create) | **POST** /api/admin/support-content | Create a new support content
[**delete**](AdminSupportContentApi.md#delete) | **DELETE** /api/admin/support-content/{slug} | Delete a support content by slug
[**findAll**](AdminSupportContentApi.md#findall) | **GET** /api/admin/support-content | Get all support contents
[**findOne**](AdminSupportContentApi.md#findone) | **GET** /api/admin/support-content/{slug} | Get a support content by slug
[**findTop**](AdminSupportContentApi.md#findtop) | **GET** /api/admin/support-content/top | Get top support contents
[**findTree**](AdminSupportContentApi.md#findtree) | **GET** /api/admin/support-content/tree | Get support content as a tree
[**patchTree**](AdminSupportContentApi.md#patchtree) | **PATCH** /api/admin/support-content/tree | Update support content&#39;s tree order
[**rank**](AdminSupportContentApi.md#rank) | **PATCH** /api/admin/support-content | Update rank support content&#39;s tree order
[**searchInAll**](AdminSupportContentApi.md#searchinall) | **GET** /api/admin/support-content/search | Serach in all support contents
[**update**](AdminSupportContentApi.md#update) | **PATCH** /api/admin/support-content/{slug} | Update support content


# **create**
> SupportContent create(supportContent)

Create a new support content

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final SupportContent supportContent = ; // SupportContent | 

try {
    final response = api.create(supportContent);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->create: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **supportContent** | [**SupportContent**](SupportContent.md)|  | 

### Return type

[**SupportContent**](SupportContent.md)

### Authorization

No authorization required

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

# **delete**
> OkRes delete(slug)

Delete a support content by slug

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final String slug = slug; // String | A unique name for each support content

try {
    final response = api.delete(slug);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->delete: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **slug** | **String**| A unique name for each support content | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

# **findAll**
> FindAllSupportContent findAll()

Get all support contents

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();

try {
    final response = api.findAll();
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->findAll: $e\n');
}
```

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

### Return type

[**FindAllSupportContent**](FindAllSupportContent.md)

### Authorization

No authorization required

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

# **findOne**
> SupportContentRes findOne(slug)

Get a support content by slug

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final String slug = slug_example; // String | 

try {
    final response = api.findOne(slug);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->findOne: $e\n');
}
```

### Parameters

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

### Return type

[**SupportContentRes**](SupportContentRes.md)

### Authorization

No authorization required

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

# **findTop**
> FindTopSupportContentRes findTop()

Get top support contents

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();

try {
    final response = api.findTop();
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->findTop: $e\n');
}
```

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

### Return type

[**FindTopSupportContentRes**](FindTopSupportContentRes.md)

### Authorization

No authorization required

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

# **findTree**
> FindAllSupportContent findTree()

Get support content as a tree

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();

try {
    final response = api.findTree();
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->findTree: $e\n');
}
```

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

### Return type

[**FindAllSupportContent**](FindAllSupportContent.md)

### Authorization

No authorization required

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

# **patchTree**
> OkRes patchTree(patchSupportContentTreeDto)

Update support content's tree order

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final BuiltList<PatchSupportContentTreeDto> patchSupportContentTreeDto = ; // BuiltList<PatchSupportContentTreeDto> | 

try {
    final response = api.patchTree(patchSupportContentTreeDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->patchTree: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **patchSupportContentTreeDto** | [**BuiltList&lt;PatchSupportContentTreeDto&gt;**](PatchSupportContentTreeDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

# **rank**
> OkRes rank(rankSupportContentDto)

Update rank support content's tree order

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final RankSupportContentDto rankSupportContentDto = ; // RankSupportContentDto | 

try {
    final response = api.rank(rankSupportContentDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->rank: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **rankSupportContentDto** | [**RankSupportContentDto**](RankSupportContentDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

# **searchInAll**
> SearchSupportContentRes searchInAll(search)

Serach in all support contents

Search in title and content

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final String search = search_example; // String | 

try {
    final response = api.searchInAll(search);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->searchInAll: $e\n');
}
```

### Parameters

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

### Return type

[**SearchSupportContentRes**](SearchSupportContentRes.md)

### Authorization

No authorization required

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

# **update**
> OkRes update(slug, supportContent)

Update support content

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAdminSupportContentApi();
final String slug = slug_example; // String | 
final SupportContent supportContent = ; // SupportContent | 

try {
    final response = api.update(slug, supportContent);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AdminSupportContentApi->update: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **slug** | **String**|  | 
 **supportContent** | [**SupportContent**](SupportContent.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

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

