All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
GetDashboardWidgets | Get /dashboards/{dashboard-id}/widgets | Information about widgets on dashboard |
PostDashboardWidget | Post /dashboards/{dashboard-id}/widgets | Adds widget to dashboard |
Widget GetDashboardWidgets(ctx, dashboardId).Expansions(expansions).Execute()
Information about widgets on dashboard
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
dashboardId := int32(4711) // int32 | The id of the dashboard
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WidgetsAPI.GetDashboardWidgets(context.Background(), dashboardId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WidgetsAPI.GetDashboardWidgets``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDashboardWidgets`: Widget
fmt.Fprintf(os.Stdout, "Response from `WidgetsAPI.GetDashboardWidgets`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
dashboardId | int32 | The id of the dashboard |
Other parameters are passed through a pointer to a apiGetDashboardWidgetsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostDashboardWidget(ctx, dashboardId).Widget(widget).Expansions(expansions).Execute()
Adds widget to dashboard
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
dashboardId := int32(4711) // int32 | The id of the dashboard
widget := *openapiclient.NewWidget("Weather") // Widget |
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WidgetsAPI.PostDashboardWidget(context.Background(), dashboardId).Widget(widget).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WidgetsAPI.PostDashboardWidget``: %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. | |
dashboardId | int32 | The id of the dashboard |
Other parameters are passed through a pointer to a apiPostDashboardWidgetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
widget | Widget | | expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]