All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
DeleteAggregationById | Delete /aggregations/{aggregation-id} | Delete an aggregation |
GetAggregationById | Get /aggregations/{aggregation-id} | Information about an aggregation |
GetAggregations | Get /aggregations | Information about aggregations |
PostAggregation | Post /aggregations | Creates an aggregation |
PutAggregation | Put /aggregations | Creates or updates an aggregation |
PutAggregationById | Put /aggregations/{aggregation-id} | Updates an aggregation |
DeleteAggregationById(ctx, aggregationId).Execute()
Delete an aggregation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
aggregationId := int32(4711) // int32 | The id of the aggregation
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AggregationsAPI.DeleteAggregationById(context.Background(), aggregationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.DeleteAggregationById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
aggregationId | int32 | The id of the aggregation |
Other parameters are passed through a pointer to a apiDeleteAggregationByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Aggregation GetAggregationById(ctx, aggregationId).Execute()
Information about an aggregation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
aggregationId := int32(4711) // int32 | The id of the aggregation
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AggregationsAPI.GetAggregationById(context.Background(), aggregationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.GetAggregationById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAggregationById`: Aggregation
fmt.Fprintf(os.Stdout, "Response from `AggregationsAPI.GetAggregationById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
aggregationId | int32 | The id of the aggregation |
Other parameters are passed through a pointer to a apiGetAggregationByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Aggregation GetAggregations(ctx).Execute()
Information about aggregations
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AggregationsAPI.GetAggregations(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.GetAggregations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAggregations`: []Aggregation
fmt.Fprintf(os.Stdout, "Response from `AggregationsAPI.GetAggregations`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAggregationsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Aggregation PostAggregation(ctx).Aggregation(aggregation).Execute()
Creates an aggregation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
aggregation := *openapiclient.NewAggregation(int32(4711), openapiclient.DataSubtype("input"), "avg") // Aggregation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AggregationsAPI.PostAggregation(context.Background()).Aggregation(aggregation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.PostAggregation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostAggregation`: Aggregation
fmt.Fprintf(os.Stdout, "Response from `AggregationsAPI.PostAggregation`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostAggregationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
aggregation | Aggregation |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Aggregation PutAggregation(ctx).Aggregation(aggregation).Execute()
Creates or updates an aggregation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
aggregation := *openapiclient.NewAggregation(int32(4711), openapiclient.DataSubtype("input"), "avg") // Aggregation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AggregationsAPI.PutAggregation(context.Background()).Aggregation(aggregation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.PutAggregation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAggregation`: Aggregation
fmt.Fprintf(os.Stdout, "Response from `AggregationsAPI.PutAggregation`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutAggregationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
aggregation | Aggregation |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Aggregation PutAggregationById(ctx, aggregationId).Aggregation(aggregation).Execute()
Updates an aggregation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
aggregationId := int32(4711) // int32 | The id of the aggregation
aggregation := *openapiclient.NewAggregation(int32(4711), openapiclient.DataSubtype("input"), "avg") // Aggregation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AggregationsAPI.PutAggregationById(context.Background(), aggregationId).Aggregation(aggregation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AggregationsAPI.PutAggregationById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAggregationById`: Aggregation
fmt.Fprintf(os.Stdout, "Response from `AggregationsAPI.PutAggregationById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
aggregationId | int32 | The id of the aggregation |
Other parameters are passed through a pointer to a apiPutAggregationByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
aggregation | Aggregation | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]