All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
GetDashboardById | Get /dashboards/{dashboard-id} | Information about a dashboard |
GetDashboards | Get /dashboards | Information about dashboards |
PostDashboard | Post /dashboards | Creates a new dashboard |
Dashboard GetDashboardById(ctx, dashboardId).Expansions(expansions).Execute()
Information about a 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.DashboardsAPI.GetDashboardById(context.Background(), dashboardId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DashboardsAPI.GetDashboardById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDashboardById`: Dashboard
fmt.Fprintf(os.Stdout, "Response from `DashboardsAPI.GetDashboardById`: %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 apiGetDashboardByIdRequest 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]
[]Dashboard GetDashboards(ctx).Expansions(expansions).Execute()
Information about dashboards
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
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.DashboardsAPI.GetDashboards(context.Background()).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DashboardsAPI.GetDashboards``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDashboards`: []Dashboard
fmt.Fprintf(os.Stdout, "Response from `DashboardsAPI.GetDashboards`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetDashboardsRequest 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]
Dashboard PostDashboard(ctx).Dashboard(dashboard).Expansions(expansions).Execute()
Creates a new dashboard
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
dashboard := *openapiclient.NewDashboard("Weather info", "99", "42") // 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.DashboardsAPI.PostDashboard(context.Background()).Dashboard(dashboard).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DashboardsAPI.PostDashboard``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostDashboard`: Dashboard
fmt.Fprintf(os.Stdout, "Response from `DashboardsAPI.PostDashboard`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostDashboardRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
dashboard | Dashboard | ||
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: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]