190 lines
5.1 KiB
Markdown

# mycoreapi.api.ProviderApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
Method | HTTP request | Description
------------- | ------------- | -------------
[**providerCreate**](ProviderApi.md#providercreate) | **POST** /api/provider | Create a provider
[**providerDelete**](ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider
[**providerGetAll**](ProviderApi.md#providergetall) | **GET** /api/provider/{userId} | Get all user providers
[**providerUpdate**](ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider
# **providerCreate**
> ProviderDTO providerCreate(providerDTO)
Create a provider
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ProviderApi();
final providerDTO = ProviderDTO(); // ProviderDTO | Provider to create
try {
final result = api_instance.providerCreate(providerDTO);
print(result);
} catch (e) {
print('Exception when calling ProviderApi->providerCreate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**providerDTO** | [**ProviderDTO**](ProviderDTO.md)| Provider to create |
### Return type
[**ProviderDTO**](ProviderDTO.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)
# **providerDelete**
> String providerDelete(providerId)
Delete a provider
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ProviderApi();
final providerId = providerId_example; // String | Id of provider to delete
try {
final result = api_instance.providerDelete(providerId);
print(result);
} catch (e) {
print('Exception when calling ProviderApi->providerDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**providerId** | **String**| Id of provider to delete |
### 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)
# **providerGetAll**
> List<ProviderDTO> providerGetAll(userId)
Get all user providers
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ProviderApi();
final userId = userId_example; // String | Id of user
try {
final result = api_instance.providerGetAll(userId);
print(result);
} catch (e) {
print('Exception when calling ProviderApi->providerGetAll: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
### Return type
[**List<ProviderDTO>**](ProviderDTO.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)
# **providerUpdate**
> DeviceDetailDTO providerUpdate(providerDTO)
Update a provider
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ProviderApi();
final providerDTO = ProviderDTO(); // ProviderDTO | Provider to update
try {
final result = api_instance.providerUpdate(providerDTO);
print(result);
} catch (e) {
print('Exception when calling ProviderApi->providerUpdate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**providerDTO** | [**ProviderDTO**](ProviderDTO.md)| Provider to update |
### Return type
[**DeviceDetailDTO**](DeviceDetailDTO.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)