All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
DeleteCalculationRuleById | Delete /calculation-rules/{calculation-rule-id} | Delete a calculation rule |
GetCalculationRuleById | Get /calculation-rules/{calculation-rule-id} | Information about a calculation rules rule |
GetCalculationRules | Get /calculation-rules | Information about calculation rules |
PutCalculationRule | Put /calculation-rules | Creates or updates a calculation rule |
PutCalculationRuleById | Put /calculation-rules/{calculation-rule-id} | Update a calculation rule |
DeleteCalculationRuleById(ctx, calculationRuleId).Execute()
Delete a calculation rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
calculationRuleId := int32(4711) // int32 | The id of the calculation rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CalculationRulesAPI.DeleteCalculationRuleById(context.Background(), calculationRuleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CalculationRulesAPI.DeleteCalculationRuleById``: %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. | |
calculationRuleId | int32 | The id of the calculation rule |
Other parameters are passed through a pointer to a apiDeleteCalculationRuleByIdRequest 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]
CalculationRule GetCalculationRuleById(ctx, calculationRuleId).Execute()
Information about a calculation rules rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
calculationRuleId := int32(4711) // int32 | The id of the calculation rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CalculationRulesAPI.GetCalculationRuleById(context.Background(), calculationRuleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CalculationRulesAPI.GetCalculationRuleById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCalculationRuleById`: CalculationRule
fmt.Fprintf(os.Stdout, "Response from `CalculationRulesAPI.GetCalculationRuleById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
calculationRuleId | int32 | The id of the calculation rule |
Other parameters are passed through a pointer to a apiGetCalculationRuleByIdRequest 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]
[]CalculationRule GetCalculationRules(ctx).CalculationRuleIds(calculationRuleIds).Execute()
Information about calculation rules
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
calculationRuleIds := []int32{int32(123)} // []int32 | List of calculation rule ids for filtering (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CalculationRulesAPI.GetCalculationRules(context.Background()).CalculationRuleIds(calculationRuleIds).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CalculationRulesAPI.GetCalculationRules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCalculationRules`: []CalculationRule
fmt.Fprintf(os.Stdout, "Response from `CalculationRulesAPI.GetCalculationRules`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetCalculationRulesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
calculationRuleIds | []int32 | List of calculation rule ids for filtering |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CalculationRule PutCalculationRule(ctx).CalculationRule(calculationRule).Execute()
Creates or updates a calculation rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
calculationRule := *openapiclient.NewCalculationRule(int32(4711), openapiclient.DataSubtype("input"), "temperature") // CalculationRule |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CalculationRulesAPI.PutCalculationRule(context.Background()).CalculationRule(calculationRule).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CalculationRulesAPI.PutCalculationRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutCalculationRule`: CalculationRule
fmt.Fprintf(os.Stdout, "Response from `CalculationRulesAPI.PutCalculationRule`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutCalculationRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
calculationRule | CalculationRule |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CalculationRule PutCalculationRuleById(ctx, calculationRuleId).CalculationRule(calculationRule).Execute()
Update a calculation rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
calculationRuleId := int32(4711) // int32 | The id of the calculation rule
calculationRule := *openapiclient.NewCalculationRule(int32(4711), openapiclient.DataSubtype("input"), "temperature") // CalculationRule |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CalculationRulesAPI.PutCalculationRuleById(context.Background(), calculationRuleId).CalculationRule(calculationRule).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CalculationRulesAPI.PutCalculationRuleById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutCalculationRuleById`: CalculationRule
fmt.Fprintf(os.Stdout, "Response from `CalculationRulesAPI.PutCalculationRuleById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
calculationRuleId | int32 | The id of the calculation rule |
Other parameters are passed through a pointer to a apiPutCalculationRuleByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
calculationRule | CalculationRule | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]