60 lines
1.6 KiB
Markdown

# mycoreapi.api.EnergyApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**energyGetElectricityProduction**](EnergyApi.md#energygetelectricityproduction) | **GET** /api/energy/electricity | Get summary production of Kwh/Year
# **energyGetElectricityProduction**
> List<ElectricityProduction> energyGetElectricityProduction(userId, viewBy)
Get summary production of Kwh/Year
### 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 = EnergyApi();
final userId = userId_example; // String |
final viewBy = ; // ViewBy |
try {
final result = api_instance.energyGetElectricityProduction(userId, viewBy);
print(result);
} catch (e) {
print('Exception when calling EnergyApi->energyGetElectricityProduction: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| | [optional]
**viewBy** | [**ViewBy**](.md)| | [optional]
### Return type
[**List<ElectricityProduction>**](ElectricityProduction.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)