# openapi.api.AuthApi

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

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteAccount**](AuthApi.md#deleteaccount) | **DELETE** /api/auth/delete-account | 
[**login**](AuthApi.md#login) | **POST** /api/auth/login | 
[**logout**](AuthApi.md#logout) | **POST** /api/auth/logout | 
[**refresh**](AuthApi.md#refresh) | **POST** /api/auth/refresh-token | 
[**register**](AuthApi.md#register) | **POST** /api/auth/register | 
[**updateProfile**](AuthApi.md#updateprofile) | **PUT** /api/auth/update-profile | 


# **deleteAccount**
> OkRes deleteAccount()



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

final api = Openapi().getAuthApi();

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

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

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

# **login**
> LoginRes login(loginDto)



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

final api = Openapi().getAuthApi();
final LoginDto loginDto = ; // LoginDto | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **loginDto** | [**LoginDto**](LoginDto.md)|  | 

### Return type

[**LoginRes**](LoginRes.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)

# **logout**
> logout(authDto)



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

final api = Openapi().getAuthApi();
final AuthDto authDto = ; // AuthDto | 

try {
    api.logout(authDto);
} catch on DioError (e) {
    print('Exception when calling AuthApi->logout: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **authDto** | [**AuthDto**](AuthDto.md)|  | 

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: 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)

# **refresh**
> RefreshTokenRes refresh(authDto)



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

final api = Openapi().getAuthApi();
final AuthDto authDto = ; // AuthDto | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **authDto** | [**AuthDto**](AuthDto.md)|  | 

### Return type

[**RefreshTokenRes**](RefreshTokenRes.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)

# **register**
> register(registerDto)



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

final api = Openapi().getAuthApi();
final RegisterDto registerDto = ; // RegisterDto | 

try {
    api.register(registerDto);
} catch on DioError (e) {
    print('Exception when calling AuthApi->register: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **registerDto** | [**RegisterDto**](RegisterDto.md)|  | 

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: 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)

# **updateProfile**
> OkRes updateProfile(updateProfileDto)



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

final api = Openapi().getAuthApi();
final UpdateProfileDto updateProfileDto = ; // UpdateProfileDto | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **updateProfileDto** | [**UpdateProfileDto**](UpdateProfileDto.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)

